From e34dbc4fdcae6e21bb186c225f76d399d2656d75 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 24 Jul 2017 02:49:56 +0200 Subject: ash: add all hush parsing tests to ast tests All pass. Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-parsing/negate.tests | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 shell/ash_test/ash-parsing/negate.tests (limited to 'shell/ash_test/ash-parsing/negate.tests') diff --git a/shell/ash_test/ash-parsing/negate.tests b/shell/ash_test/ash-parsing/negate.tests new file mode 100755 index 000000000..51151cbd4 --- /dev/null +++ b/shell/ash_test/ash-parsing/negate.tests @@ -0,0 +1,19 @@ +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 -- cgit v1.2.3