diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-08 18:33:14 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-08 18:35:24 -0700 |
commit | bf3ee23890db33e3d0bef5344e896d2cdfaa34aa (patch) | |
tree | 5c475fac6993168745d8dfe916e3f3e9f40b9013 /tests/encoding-error | |
parent | 4b753219c0f7e57266d7b68032b7a5e3b2b9a404 (diff) | |
download | grep-bf3ee23890db33e3d0bef5344e896d2cdfaa34aa.tar.gz |
grep: encoding errors suppress just their line
From a suggestion by Marcello Perathoner (Bug#22838).
* NEWS, doc/grep.texi (File and Directory Selection): Document this.
* src/grep.c (print_line_head): Do not suppress later output lines
merely because an earlier output line would have had an encoding error.
* tests/encoding-error: Test for the new behavior.
Diffstat (limited to 'tests/encoding-error')
-rwxr-xr-x | tests/encoding-error | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/encoding-error b/tests/encoding-error index 4b5fcb5b..0cbeffcc 100755 --- a/tests/encoding-error +++ b/tests/encoding-error @@ -35,6 +35,10 @@ grep '^X' in >out test $? = 1 || fail=1 compare /dev/null out || fail=1 +grep . in >out || fail=1 +(cat a j && printf 'Binary file in matches\n') >exp || framework_failure_ +compare exp out || fail=1 + grep -a . in >out || fail=1 compare in out |