diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-06-19 11:32:11 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-06-19 11:32:11 +0200 |
commit | 6be3a5242ce4855734a4cdd5770b6ea7adaf2b3d (patch) | |
tree | e4903316cbaaaeb7cb0a4396daacb3ec1ff8e467 /testsuite/find.tests | |
parent | 14158b4127dba30466c50147b868a6a89702960b (diff) | |
download | busybox-w32-6be3a5242ce4855734a4cdd5770b6ea7adaf2b3d.tar.gz busybox-w32-6be3a5242ce4855734a4cdd5770b6ea7adaf2b3d.tar.bz2 busybox-w32-6be3a5242ce4855734a4cdd5770b6ea7adaf2b3d.zip |
find: exit code fixes for find -exec
function old new delta
func_exec 127 100 -27
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/find.tests')
-rwxr-xr-x | testsuite/find.tests | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/find.tests b/testsuite/find.tests index 345d1e82e..f041106c3 100755 --- a/testsuite/find.tests +++ b/testsuite/find.tests | |||
@@ -15,6 +15,32 @@ testing "find -type f" \ | |||
15 | "./testfile\n" \ | 15 | "./testfile\n" \ |
16 | "" "" | 16 | "" "" |
17 | 17 | ||
18 | optional FEATURE_FIND_EXEC | ||
19 | testing "find -exec exitcode 1" \ | ||
20 | "cd find.tempdir && find testfile -exec true {} \; 2>&1; echo \$?" \ | ||
21 | "0\n" \ | ||
22 | "" "" | ||
23 | SKIP= | ||
24 | optional FEATURE_FIND_EXEC_PLUS | ||
25 | testing "find -exec exitcode 2" \ | ||
26 | "cd find.tempdir && find testfile -exec true {} + 2>&1; echo \$?" \ | ||
27 | "0\n" \ | ||
28 | "" "" | ||
29 | SKIP= | ||
30 | # Surprisingly, "-exec false ;" results in exitcode 0! "-exec false +" is different!!! | ||
31 | optional FEATURE_FIND_EXEC | ||
32 | testing "find -exec exitcode 3" \ | ||
33 | "cd find.tempdir && find testfile -exec false {} \; 2>&1; echo \$?" \ | ||
34 | "0\n" \ | ||
35 | "" "" | ||
36 | SKIP= | ||
37 | optional FEATURE_FIND_EXEC_PLUS | ||
38 | testing "find -exec exitcode 4" \ | ||
39 | "cd find.tempdir && find testfile -exec false {} + 2>&1; echo \$?" \ | ||
40 | "1\n" \ | ||
41 | "" "" | ||
42 | SKIP= | ||
43 | |||
18 | # testing "description" "command" "result" "infile" "stdin" | 44 | # testing "description" "command" "result" "infile" "stdin" |
19 | 45 | ||
20 | rm -rf find.tempdir | 46 | rm -rf find.tempdir |