[Toybox] [PATCH] Add find tests.

Daniel K. Levy alliedenvy at gmail.com
Sat Sep 12 17:07:06 PDT 2015


On Sat, 2015-09-12 at 16:22 -0700, enh wrote:
> add tests?

Sure :)

diff --git a/tests/find.test b/tests/find.test
index cbbce5f..9d69653 100755
--- a/tests/find.test
+++ b/tests/find.test
@@ -39,4 +39,18 @@ testing "find -type f -a -print" \
 testing "find -print -o -print" \
        "find dir -type f -a \( -print -o -print \)" "dir/file\n" "" ""
 
+# Testing previous failures
+
+testing "find -type f -user -exec" \
+  "find dir -type f -user $USER -exec ls {} \\;" "dir/file\n" "" ""
+testing "find -type l -newer -exec" \
+  "find dir -type l -newer dir/file -exec ls {} \\;" "dir/link\n" "" ""
+testing "find unterminated -exec {}" \
+  "find dir -type f -exec ls {}" "" "" ""
+
+# Still fails
+
+testing "find -exec {} +" \
+  "find dir -type f -exec ls {} +" "dir/file\n" "" ""
+
 rm -rf dir

 1442102826.0


More information about the Toybox mailing list