aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-02-25 12:32:33 -0600
committerRob Landley <rob@landley.net>2020-02-25 12:32:33 -0600
commit4034fd798d5bca3202e836afbb3cccf4380ba88f (patch)
tree7a59f6c9b5a38cf6fa7040bc89af1a738a4da418
parent1934fddf3eb3a4336d270cc6e7d5cbffe0667c78 (diff)
downloadtoybox-4034fd798d5bca3202e836afbb3cccf4380ba88f.tar.gz
Shell ! tests
-rwxr-xr-xtests/sh.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/sh.test b/tests/sh.test
index 2bd83e4a..cf9d755d 100755
--- a/tests/sh.test
+++ b/tests/sh.test
@@ -136,7 +136,10 @@ testing "IFS combinations" \
'IFS=" x"; A=" x " B=" x" C="x " D=x E=" "; for i in $A $B $C $D L$A L$B L$C L$D $A= $B= $C= $D= L$A= L$B= L$C= L$D=; do echo -n {$i}; done' \
"{}{}{}{}{L}{L}{L}{L}{}{=}{}{=}{}{=}{}{=}{L}{=}{L}{=}{L}{=}{L}{=}" "" ""
-
+testing "! isn't special" "echo !" "!\n" "" ""
+testing "! by itself" '!; echo $?' "1\n" "" ""
+testing "! true" '! true; echo $?' "1\n" "" ""
+testing "! ! true" '! ! true; echo $?' "0\n" "" ""
# The bash man page doesn't say quote removal here, and yet:
testing "case quoting" 'case a in "a") echo hello;; esac' 'hello\n' "" ""