]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/expansion/pathname4.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / expansion / pathname4.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/expansion/pathname4.0 211646 2010-08-22 21:18:21Z jilles $
71aad674
A
2
3failures=0
4
5check() {
6 testcase=$1
7 expect=$2
8 eval "set -- $testcase"
9 actual="$*"
10 if [ "$actual" != "$expect" ]; then
11 failures=$((failures+1))
12 printf '%s\n' "For $testcase, expected $expect actual $actual"
13 fi
14}
15
16set -e
17T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
18trap 'rm -rf $T' 0
19cd -P $T
20
21mkdir !!a
22touch !!a/fff
23
24chmod u-r .
25check '!!a/ff*' '!!a/fff'
26chmod u+r .
27
28exit $((failures != 0))