summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2016-11-25 20:14:33 +0100
committerDenys Vlasenko2016-11-25 20:14:33 +0100
commitccc9985c455753298a8799a4d12d5f531c67ae81 (patch)
tree78d6082132ec226ba81ccb797c6defe927d67b42 /testsuite
parent4b89d512b1215e7b9d619af03496540d30cbbd1a (diff)
downloadbusybox-ccc9985c455753298a8799a4d12d5f531c67ae81.zip
busybox-ccc9985c455753298a8799a4d12d5f531c67ae81.tar.gz
find: fix handling of trailing slashes in -name PATTERN comparisons
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/find.tests27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/find.tests b/testsuite/find.tests
index 78dfa12..138236c 100755
--- a/testsuite/find.tests
+++ b/testsuite/find.tests
@@ -41,6 +41,33 @@ testing "find -exec exitcode 4" \
"1\n" \
"" ""
SKIP=
+optional FEATURE_FIND_MAXDEPTH
+testing "find / -maxdepth 0 -name /" \
+ "find / -maxdepth 0 -name /" \
+ "/\n" \
+ "" ""
+testing "find // -maxdepth 0 -name /" \
+ "find // -maxdepth 0 -name /" \
+ "//\n" \
+ "" ""
+testing "find / -maxdepth 0 -name //" \
+ "find / -maxdepth 0 -name //" \
+ "" \
+ "" ""
+testing "find // -maxdepth 0 -name //" \
+ "find // -maxdepth 0 -name //" \
+ "" \
+ "" ""
+SKIP=
+
+testing "find ./// -name ." \
+ "find ./// -name ." \
+ ".///\n" \
+ "" ""
+testing "find ./// -name .///" \
+ "find ./// -name .///" \
+ "" \
+ "" ""
# testing "description" "command" "result" "infile" "stdin"