diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-09 05:48:42 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-09 05:48:42 +0000 |
commit | 1e2a7e4ed1ddcd457b6e7e3eebd6a90b7621079e (patch) | |
tree | 6949b702f7751c00b72bb24e1af7ca70c9f9c961 /testsuite/test.tests | |
parent | 6d52c1ee24f77690c932dfe8456dfa31e8808f4c (diff) | |
download | busybox-w32-1e2a7e4ed1ddcd457b6e7e3eebd6a90b7621079e.tar.gz busybox-w32-1e2a7e4ed1ddcd457b6e7e3eebd6a90b7621079e.tar.bz2 busybox-w32-1e2a7e4ed1ddcd457b6e7e3eebd6a90b7621079e.zip |
test: fix mishandling of 'test ! arg1 op arg2 more args'; add testsuite
Diffstat (limited to 'testsuite/test.tests')
-rwxr-xr-x | testsuite/test.tests | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/test.tests b/testsuite/test.tests new file mode 100755 index 000000000..351d35565 --- /dev/null +++ b/testsuite/test.tests | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> | ||
4 | # Licensed under GPL v2, see file LICENSE for details. | ||
5 | |||
6 | . testing.sh | ||
7 | |||
8 | # testing "test name" "options" "expected result" "file input" "stdin" | ||
9 | # file input will be file called "input" | ||
10 | # test can create a file "actual" instead of writing to stdout | ||
11 | |||
12 | # Need to call 'busybox test', otherwise shell builtin is used | ||
13 | |||
14 | testing "test ! a = b -a ! c = c: should be false" \ | ||
15 | "busybox test ! a = b -a ! c = c; echo \$?" \ | ||
16 | "1\n" \ | ||
17 | "" \ | ||
18 | "" \ | ||
19 | |||
20 | testing "test ! a = b -a ! c = d: should be true" \ | ||
21 | "busybox test ! a = b -a ! c = d; echo \$?" \ | ||
22 | "0\n" \ | ||
23 | "" \ | ||
24 | "" \ | ||
25 | |||
26 | exit $FAILCOUNT | ||