3 |
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> |
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> |
4 |
# Licensed under GPL v2, see file LICENSE for details. |
# Licensed under GPL v2, see file LICENSE for details. |
5 |
|
|
6 |
. testing.sh |
. ./testing.sh |
7 |
|
|
8 |
# testing "test name" "command" "expected result" "file input" "stdin" |
# testing "test name" "command" "expected result" "file input" "stdin" |
9 |
# file input will be file called "input" |
# file input will be file called "input" |
21 |
"1\n" \ |
"1\n" \ |
22 |
"" "" |
"" "" |
23 |
|
|
24 |
|
testing "test !: should be true (0)" \ |
25 |
|
"busybox test !; echo \$?" \ |
26 |
|
"0\n" \ |
27 |
|
"" "" |
28 |
|
|
29 |
testing "test a: should be true (0)" \ |
testing "test a: should be true (0)" \ |
30 |
"busybox test a; echo \$?" \ |
"busybox test a; echo \$?" \ |
31 |
"0\n" \ |
"0\n" \ |
56 |
"1\n" \ |
"1\n" \ |
57 |
"" "" |
"" "" |
58 |
|
|
59 |
|
testing "test a -a !: should be true (0)" \ |
60 |
|
"busybox test a -a !; echo \$?" \ |
61 |
|
"0\n" \ |
62 |
|
"" "" |
63 |
|
|
64 |
testing "test -f = a -o b: should be true (0)" \ |
testing "test -f = a -o b: should be true (0)" \ |
65 |
"busybox test -f = a -o b; echo \$?" \ |
"busybox test -f = a -o b; echo \$?" \ |
66 |
"0\n" \ |
"0\n" \ |