]>
Commit | Line | Data |
---|---|---|
deb63bfb | 1 | # $FreeBSD: head/bin/sh/tests/expansion/pathname4.0 211646 2010-08-22 21:18:21Z jilles $ |
71aad674 A |
2 | |
3 | failures=0 | |
4 | ||
5 | check() { | |
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 | ||
16 | set -e | |
17 | T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) | |
18 | trap 'rm -rf $T' 0 | |
19 | cd -P $T | |
20 | ||
21 | mkdir !!a | |
22 | touch !!a/fff | |
23 | ||
24 | chmod u-r . | |
25 | check '!!a/ff*' '!!a/fff' | |
26 | chmod u+r . | |
27 | ||
28 | exit $((failures != 0)) |