aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-parsing/negate.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-parsing/negate.tests')
-rwxr-xr-xshell/hush_test/hush-parsing/negate.tests5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/hush_test/hush-parsing/negate.tests b/shell/hush_test/hush-parsing/negate.tests
index c25127d7f..51151cbd4 100755
--- a/shell/hush_test/hush-parsing/negate.tests
+++ b/shell/hush_test/hush-parsing/negate.tests
@@ -7,10 +7,13 @@ 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
-for a in ! a b c; do ! /usr/bin/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