diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-03 14:42:28 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-01-04 09:17:19 -0800 |
commit | d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6 (patch) | |
tree | 2627a72409bcaf965d667c3176603cc5563a1f8b /tests/r-dot | |
parent | aab59eb87d7fade0ca8a0f444f222284eb28694f (diff) | |
download | grep-d1d7245219bc56e6a4f25c18d6f8f4b4b9bb42d6.tar.gz |
grep: with no args, search "." only if command-line -r
* NEWS: Document this.
* doc/grep.texi (Environment Variables, grep Programs): Likewise.
* src/main.c (usage): Likewise.
(main): Implement this.
(prepend_default_options): Return a count of prepended options.
* tests/r-dot: Test the above.
Diffstat (limited to 'tests/r-dot')
-rwxr-xr-x | tests/r-dot | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/r-dot b/tests/r-dot index 73e593cf..a1d5c0a5 100755 --- a/tests/r-dot +++ b/tests/r-dot @@ -11,4 +11,11 @@ echo a:aaa > exp || framework_failure_ (cd dir && grep -r aaa) > out || fail=1 compare exp out || fail=1 +(cd dir && grep -r aaa < a) > out || fail=1 +compare exp out || fail=1 + +echo aaa > exp || framework_failure_ +(cd dir && GREP_OPTIONS=-r grep aaa < a) > out || fail=1 +compare exp out || fail=1 + Exit $fail |