]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/bin/sh/expansion/question1.0
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / bin / sh / expansion / question1.0
1 # $FreeBSD$
2
3 x=a\ b
4 [ "$x" = "${x?}" ] || exit 1
5 set -- ${x?}
6 { [ "$#" = 2 ] && [ "$1" = a ] && [ "$2" = b ]; } || exit 1
7 unset x
8 (echo ${x?abcdefg}) 2>&1 | grep -q abcdefg || exit 1
9 sh -c 'unset foo; echo ${foo?}' 2>/dev/null && exit 1
10 sh -c 'foo=; echo ${foo:?}' 2>/dev/null && exit 1
11 sh -c 'foo=; echo ${foo?}' >/dev/null || exit 1
12 sh -c 'foo=1; echo ${foo:?}' >/dev/null || exit 1
13 sh -c 'echo ${!?}' 2>/dev/null && exit 1
14 sh -c ':& echo ${!?}' >/dev/null || exit 1
15 sh -c 'echo ${#?}' >/dev/null || exit 1
16 sh -c 'echo ${*?}' 2>/dev/null && exit 1
17 sh -c 'echo ${*?}' sh x >/dev/null || exit 1
18 sh -c 'echo ${1?}' 2>/dev/null && exit 1
19 sh -c 'echo ${1?}' sh x >/dev/null || exit 1
20 sh -c 'echo ${2?}' sh x 2>/dev/null && exit 1
21 sh -c 'echo ${2?}' sh x y >/dev/null || exit 1
22 exit 0