diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-05 20:46:46 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-05 20:46:46 +0000 |
commit | 140644dc1cae13df47de2c9d54109c75800446d6 (patch) | |
tree | d9271ad835c4118af00d12bf3e5e7c8f87551739 /shell | |
parent | ccd412da09d3d9ff54e14874c74c0a8dde6015b2 (diff) | |
download | busybox-w32-140644dc1cae13df47de2c9d54109c75800446d6.tar.gz busybox-w32-140644dc1cae13df47de2c9d54109c75800446d6.tar.bz2 busybox-w32-140644dc1cae13df47de2c9d54109c75800446d6.zip |
add ash testcases
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash_test/ash-invert/invert.right | 10 | ||||
-rwxr-xr-x | shell/ash_test/ash-invert/invert.tests | 19 |
2 files changed, 29 insertions, 0 deletions
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 | ||
2 | 1 | ||
3 | 1 | ||
4 | 0 | ||
5 | 0 | ||
6 | 1 | ||
7 | 0 | ||
8 | 1 | ||
9 | 0 | ||
10 | 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 @@ | |||
1 | # tests of return value inversion | ||
2 | # placeholder for future expansion | ||
3 | |||
4 | # user subshells (...) did this wrong in bash versions before 2.04 | ||
5 | |||
6 | ! ( echo hello | grep h >/dev/null 2>&1 ); echo $? | ||
7 | ! echo hello | grep h >/dev/null 2>&1 ; echo $? | ||
8 | |||
9 | ! true ; echo $? | ||
10 | ! false; echo $? | ||
11 | |||
12 | ! (false) ; echo $? | ||
13 | ! (true); echo $? | ||
14 | |||
15 | ! true | false ; echo $? | ||
16 | ! false | true ; echo $? | ||
17 | |||
18 | ! (true | false) ; echo $? | ||
19 | ! (false | true) ; echo $? | ||