Contents of /trunk/mkinitrd-magellan/busybox/testsuite/xargs.tests
Parent Directory | Revision Log
Revision 1123 -
(show annotations)
(download)
Wed Aug 18 21:56:57 2010 UTC (14 years, 1 month ago) by niro
File size: 1010 byte(s)
Wed Aug 18 21:56:57 2010 UTC (14 years, 1 month ago) by niro
File size: 1010 byte(s)
-updated to busybox-1.17.1
1 | #!/bin/sh |
2 | # Copyright 2008 by Denys Vlasenko |
3 | # Licensed under GPL v2, see file LICENSE for details. |
4 | |
5 | . ./testing.sh |
6 | |
7 | # testing "test name" "command" "expected result" "file input" "stdin" |
8 | |
9 | testing "xargs -E _ stops on underscore" \ |
10 | "xargs -E _" \ |
11 | "a\n" \ |
12 | "" "a\n_\nb\n" |
13 | |
14 | testing "xargs -E ''" \ |
15 | "xargs -E ''" \ |
16 | "a _ b\n" \ |
17 | "" "a\n_\nb\n" |
18 | |
19 | testing "xargs -e without param" \ |
20 | "xargs -e" \ |
21 | "a _ b\n" \ |
22 | "" "a\n_\nb\n" |
23 | |
24 | testing "xargs does not stop on underscore ('new' GNU behavior)" \ |
25 | "xargs" \ |
26 | "a _ b\n" \ |
27 | "" "a\n_\nb\n" |
28 | |
29 | testing "xargs -s7 can take one-char input" \ |
30 | "xargs -s7 echo" \ |
31 | "a\n" \ |
32 | "" "a\n" |
33 | |
34 | testing "xargs -sNUM test 1" \ |
35 | "xargs -ts25 echo 2>&1 >/dev/null" \ |
36 | "echo 1 2 3 4 5 6 7 8 9 0\n""echo 1 2 3 4 5 6 7 8 9\n""echo 00\n" \ |
37 | "" "1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 00\n" |
38 | |
39 | testing "xargs -sNUM test 2" \ |
40 | "xargs -ts25 echo 1 2>&1 >/dev/null" \ |
41 | "echo 1 2 3 4 5 6 7 8 9 0\n""echo 1 2 3 4 5 6 7 8 9\n""echo 1 00\n" \ |
42 | "" "2 3 4 5 6 7 8 9 0 2 3 4 5 6 7 8 9 00\n" |
43 | |
44 | exit $FAILCOUNT |