diff options
author | Elliott Hughes <enh@google.com> | 2019-08-29 13:44:59 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-08-30 13:07:57 -0500 |
commit | 3437f30ae9a24740bf3e9dd2b5db7482a5c1dfb8 (patch) | |
tree | b6db868ba899d338bc34e11ef7fc8469821aba0b /tests | |
parent | 0222d5957329eb575ef20ae7a00170bcab70b662 (diff) | |
download | toybox-3437f30ae9a24740bf3e9dd2b5db7482a5c1dfb8.tar.gz |
find: fix -name corner case.
This fixes the case where someone's done something (weird) like:
find src/*.c -name foo.c
Previously the match would fail because one side of the comparison was
already a path.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/find.test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/find.test b/tests/find.test index b3e2c4fa..1f59149b 100755 --- a/tests/find.test +++ b/tests/find.test @@ -122,4 +122,7 @@ testing "missing root error" \ "LANG=C find -L dir/missing-root 2>err ; grep -q dir/missing-root err || echo missing error" \ "" "" "" +testing "-path match root" "find dir/f* -path dir/file" "dir/file\n" "" "" +testing "-name match root" "find dir/f* -name file" "dir/file\n" "" "" + rm -rf dir |