diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-26 05:38:20 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-26 05:38:20 +0000 |
commit | 4e1e7205235510b3adeb415b4d8997932276cb81 (patch) | |
tree | e2d874580db07b436cbb0e6b326adbf0438a3e3e /testsuite/cut.tests | |
parent | ed270a5f32e4fee0d4b30595c888df54ac878fba (diff) | |
download | busybox-w32-4e1e7205235510b3adeb415b4d8997932276cb81.tar.gz busybox-w32-4e1e7205235510b3adeb415b4d8997932276cb81.tar.bz2 busybox-w32-4e1e7205235510b3adeb415b4d8997932276cb81.zip |
testsuite: add tests for cut and grep;
slight improvements to infrastructure
Diffstat (limited to 'testsuite/cut.tests')
-rw-r--r-- | testsuite/cut.tests | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/cut.tests b/testsuite/cut.tests new file mode 100644 index 000000000..e332e801d --- /dev/null +++ b/testsuite/cut.tests | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # grep tests. | ||
4 | # Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> | ||
5 | # Licensed under GPL v2, see file LICENSE for details. | ||
6 | |||
7 | . testing.sh | ||
8 | |||
9 | # testing "test name" "options" "expected result" "file input" "stdin" | ||
10 | # file input will be file called "input" | ||
11 | # test can create a file "actual" instead of writing to stdout | ||
12 | |||
13 | testing "cut '-' (stdin) and multi file handling" \ | ||
14 | "cut -d' ' -f2 - input" \ | ||
15 | "over\n""quick\n" \ | ||
16 | "the quick brown fox\n" \ | ||
17 | "jumps over the lazy dog\n" \ | ||
18 | |||
19 | exit $FAILCOUNT | ||