hush/shell/hush_test/hush-parsing/negate.tests
Denys Vlasenko 09516066d4 hush: do not use ps -o in leak_argv1; do not hardcode path in negate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-12 14:21:30 +02:00

20 lines
587 B
Plaintext
Executable File

echo ! printing !
! false
echo $?
! true
echo $?
if ! false; then false; echo $?; fi
echo $?
if ! false; then ! false; echo $?; fi
echo $?
PRINTF=`which printf`
for a in ! a b c; do echo $a; done
for a in ! a b c; do ! printf "$a "; echo $?; done
test x"$PRINTF" = x"" && exit 1
for a in ! a b c; do ! "$PRINTF" "$a "; echo $?; done
for a in ! a b c; do ! printf "$a " | false; echo $?; done
for a in ! a b c; do ! printf "$a " | true; echo $?; done
for a in ! a b c; do ! { printf "$a " | false; }; echo $?; done
for a in ! a b c; do ! { printf "$a " | true; }; echo $?; done
echo Done