From 271793f09cc604ad54ad89b18110716555cc748b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Sep 2020 07:54:38 -0700 Subject: 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. --- tests/encoding-error | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/encoding-error') 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 -- cgit v1.2.1