From: Denis Vlasenko Date: Mon, 5 Mar 2007 20:46:46 +0000 (-0000) Subject: add ash testcases X-Git-Tag: 1_5_1~113 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=140644dc1cae13df47de2c9d54109c75800446d6;p=oweals%2Fbusybox.git add ash testcases --- diff --git a/shell/ash_test/ash-invert/invert.right b/shell/ash_test/ash-invert/invert.right new file mode 100644 index 000000000..5a9239aa6 --- /dev/null +++ b/shell/ash_test/ash-invert/invert.right @@ -0,0 +1,10 @@ +1 +1 +1 +0 +0 +1 +0 +1 +0 +1 diff --git a/shell/ash_test/ash-invert/invert.tests b/shell/ash_test/ash-invert/invert.tests new file mode 100755 index 000000000..8393d95a4 --- /dev/null +++ b/shell/ash_test/ash-invert/invert.tests @@ -0,0 +1,19 @@ +# tests of return value inversion +# placeholder for future expansion + +# user subshells (...) did this wrong in bash versions before 2.04 + +! ( echo hello | grep h >/dev/null 2>&1 ); echo $? +! echo hello | grep h >/dev/null 2>&1 ; echo $? + +! true ; echo $? +! false; echo $? + +! (false) ; echo $? +! (true); echo $? + +! true | false ; echo $? +! false | true ; echo $? + +! (true | false) ; echo $? +! (false | true) ; echo $?