diff options
author | Jim Meyering <meyering@redhat.com> | 2011-12-11 19:26:38 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-12-12 14:09:51 +0100 |
commit | ed071726be5758b1422d7972450a1867655268b4 (patch) | |
tree | b8445db49b05cc80b20b1e200c0d5dc5de59bdfe /tests | |
parent | 979592944f06bddb108458073239d2ff52d2c475 (diff) | |
download | grep-ed071726be5758b1422d7972450a1867655268b4.tar.gz |
disable the new input==output guard for additional options
* src/main.c (grepfile): Do not reject input == output also
when using a few other options.
* tests/in-eq-out-infloop: Test these new cases.
* NEWS (Bug fixes): Mention it
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/in-eq-out-infloop | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/in-eq-out-infloop b/tests/in-eq-out-infloop index 726accba..dcb7ac05 100755 --- a/tests/in-eq-out-infloop +++ b/tests/in-eq-out-infloop @@ -23,4 +23,13 @@ test $st = 2 || fail=1 compare err.exp err || fail=1 +# But with each of the following options it must not exit-2. +for i in -q -m1 -l -L; do + timeout 10 grep $i 0 out >> out 2> err; st=$? + test $st = 2 && fail=1 +done + +timeout 10 grep -2 0 out >> out 2> err; st=$? +test $st = 2 || fail=1 + Exit $fail |