1*3e3895bfSKrzysztof Piecuch# $FreeBSD: head/bin/sh/tests/expansion/pathname6.0 302937 2016-07-16 13:26:18Z ache $ 2*3e3895bfSKrzysztof Piecuch 3*3e3895bfSKrzysztof Piecuchunset LC_ALL 4*3e3895bfSKrzysztof PiecuchLC_COLLATE=en_US.US-ASCII 5*3e3895bfSKrzysztof Piecuchexport LC_COLLATE 6*3e3895bfSKrzysztof Piecuch 7*3e3895bfSKrzysztof Piecuchfailures=0 8*3e3895bfSKrzysztof Piecuch 9*3e3895bfSKrzysztof Piecuchcheck() { 10*3e3895bfSKrzysztof Piecuch testcase=$1 11*3e3895bfSKrzysztof Piecuch expect=$2 12*3e3895bfSKrzysztof Piecuch eval "set -- $testcase" 13*3e3895bfSKrzysztof Piecuch actual="$*" 14*3e3895bfSKrzysztof Piecuch if [ "$actual" != "$expect" ]; then 15*3e3895bfSKrzysztof Piecuch failures=$((failures+1)) 16*3e3895bfSKrzysztof Piecuch printf '%s\n' "For $testcase, expected $expect actual $actual" 17*3e3895bfSKrzysztof Piecuch fi 18*3e3895bfSKrzysztof Piecuch} 19*3e3895bfSKrzysztof Piecuch 20*3e3895bfSKrzysztof Piecuchset -e 21*3e3895bfSKrzysztof PiecuchT=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) 22*3e3895bfSKrzysztof Piecuchtrap 'rm -rf $T' 0 23*3e3895bfSKrzysztof Piecuchcd -P $T 24*3e3895bfSKrzysztof Piecuch 25*3e3895bfSKrzysztof Piecuchtouch A B a b 26*3e3895bfSKrzysztof Piecuch 27*3e3895bfSKrzysztof Piecuchcheck '*' 'a A b B' 28*3e3895bfSKrzysztof Piecuch 29*3e3895bfSKrzysztof Piecuchexit $((failures != 0)) 30