diff options
author | Elliott Hughes <enh@google.com> | 2019-05-24 13:30:51 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-05-25 20:24:35 -0500 |
commit | 2f9d9096aac148a26254801014feaff057b64fa0 (patch) | |
tree | ff96e3065fb94a805b57d109a899d5c2f7354377 /tests | |
parent | 797e55ad9b41d3084095c1422210375e7b24e48f (diff) | |
download | toybox-2f9d9096aac148a26254801014feaff057b64fa0.tar.gz |
grep: add --exclude-dir.
Used quite a lot, especially with `--exclude-dir=.git`.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/grep.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/grep.test b/tests/grep.test index 0e0f3c47..dee59924 100755 --- a/tests/grep.test +++ b/tests/grep.test @@ -167,3 +167,11 @@ ln -s nope sub/link testing "" 'grep -r walrus sub 2>/dev/null; echo $?' "1\n" "" "" rm -rf sub +# --exclude-dir +mkdir sub +mkdir sub/yes +echo "hello world" > sub/yes/test +mkdir sub/no +echo "hello world" > sub/no/test +testing "--exclude-dir" 'grep --exclude-dir=no -r world sub' "sub/yes/test:hello world\n" "" "" +rm -rf sub |