diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-03-12 09:58:10 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-03-12 10:02:33 -0700 |
commit | 2ba6d82ef0d607dbff4f2be63fe9b13832b09070 (patch) | |
tree | 3dbd62cfefa3b439cb8417ab5b3f7cf0b40c27da /tests | |
parent | 12c957f786b12a4dd116f9c40a715d671d17fa16 (diff) | |
download | grep-2ba6d82ef0d607dbff4f2be63fe9b13832b09070.tar.gz |
tests: test for bug with -r --exclude-dir and no file operand
* tests/include-exclude: Test for the bug and fix.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/include-exclude | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/include-exclude b/tests/include-exclude index 1093de9f..406e0d49 100755 --- a/tests/include-exclude +++ b/tests/include-exclude @@ -12,6 +12,7 @@ printf '%s\n' x/dir/d:ddd > exp-not-ab || framework_failure_ printf '%s\n' x/a:aaa x/b:bbb > exp-not-d || framework_failure_ printf '%s\n' x/a:aaa x/b:bbb > exp-not-dir || framework_failure_ printf '%s\n' x/a:aaa > exp-a || framework_failure_ +printf '%s\n' a:aaa > exp-aa || framework_failure_ printf '%s\n' aaa > exp-aaa || framework_failure_ grep -r --exclude='a*' . x > out || fail=1 @@ -44,6 +45,9 @@ compare exp-a out || fail=1 grep --directories=skip --include=a --exclude-dir=dir '^aaa$' x/* > out || fail=1 compare exp-a out || fail=1 +(cd x && grep -r --exclude-dir=. '^aaa$') > out || fail=1 +compare exp-aa out || fail=1 + grep --exclude=- '^aaa$' - < x/a > out || fail=1 compare exp-aaa out || fail=1 |