summaryrefslogtreecommitdiff
path: root/tests/encoding-error
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-09-17 07:54:38 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-09-17 12:15:22 -0700
commit271793f09cc604ad54ad89b18110716555cc748b (patch)
tree4c163619de49bb710bad7a72d9f33c4f461d79ea /tests/encoding-error
parentc3245083337896f266494cbd17c7350dafddb9eb (diff)
downloadgrep-271793f09cc604ad54ad89b18110716555cc748b.tar.gz
Send "Binary file FOO matches" to stderr
* NEWS, doc/grep.texi: Mention this change (Bug#29668). * src/grep.c (grep): Send "Binary file FOO matches" to stderr instead of stdout. * tests/encoding-error, tests/invalid-multibyte-infloop: * tests/null-byte, tests/pcre-count, tests/surrogate-pair: * tests/symlink, tests/unibyte-binary: Adjust tests to match new behavior. In all cases this simplifies the tests, which is a good sign.
Diffstat (limited to 'tests/encoding-error')
-rwxr-xr-xtests/encoding-error5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/encoding-error b/tests/encoding-error
index 53f77d4c..61d161ad 100755
--- a/tests/encoding-error
+++ b/tests/encoding-error
@@ -25,8 +25,7 @@ grep '^A' in >out || fail=1
compare a out || fail=1
grep '^P' in >out || fail=1
-printf 'Binary file in matches\n' >exp || framework_failure_
-compare exp out || fail=1
+compare /dev/null out || fail=1
grep -I '^P' in >out 2>err || fail=1
compare /dev/null out || fail=1
@@ -39,7 +38,7 @@ returns_ 1 grep '^X' in >out || 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_
+cat a j >exp || framework_failure_
compare exp out || fail=1
grep -I . in >out 2>err || fail=1