(--help/--version vs. /dev/full): Special-case

`[' to protect it from expected_failure_status-`eval'.
This commit is contained in:
Jim Meyering committed 2003-07-18 08:11:55 +00:00
1 parent 0f16eafda9
commit daced4a5fb
1 file changed
+3 -2
+3 -2
View File
@@ -57,13 +57,14 @@ for lang in C fr da; do
../src/$i --help >/dev/full 2>/dev/null && fail=1
../src/$i --version >/dev/full 2>/dev/null && fail=1
status=$?
eval "expected=\$expected_failure_status_$i"
test $i = [ && prog=lbracket || prog=$i
eval "expected=\$expected_failure_status_$prog"
test x$expected = x && expected=1
if test $status = $expected; then
: # ok
else
fail=1
echo "$i with --help and/or --version didn't fail with output" \
echo "*** $i with --help and/or --version didn't fail with output" \
"redirected to /dev/full" 1>&2
fi
fi