From 4034fd798d5bca3202e836afbb3cccf4380ba88f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 25 Feb 2020 12:32:33 -0600 Subject: Shell ! tests --- tests/sh.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') 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' "" "" -- cgit v1.2.3