diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-09-17 07:54:38 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-09-17 12:15:22 -0700 |
commit | 271793f09cc604ad54ad89b18110716555cc748b (patch) | |
tree | 4c163619de49bb710bad7a72d9f33c4f461d79ea /tests/surrogate-pair | |
parent | c3245083337896f266494cbd17c7350dafddb9eb (diff) | |
download | grep-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/surrogate-pair')
-rwxr-xr-x | tests/surrogate-pair | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/surrogate-pair b/tests/surrogate-pair index d4f0c0b1..7066cf4e 100755 --- a/tests/surrogate-pair +++ b/tests/surrogate-pair @@ -25,10 +25,6 @@ fail=0 printf '\360\220\220\205\n' > in || framework_failure_ -# On platforms where wchar_t is only 16 bits, wchar_t cannot represent -# the character encoded in 'in', so accept that behavior too. -printf 'Binary file in matches\n' > out16 || framework_failure_ - LC_ALL=en_US.UTF-8 export LC_ALL @@ -41,7 +37,10 @@ compare /dev/null out || fail=1 # Also test whether a surrogate-pair in the search string works. for opt in '' -i -E -F -iE -iF; do grep --file=in $opt in > out 2>&1 || fail=1 - compare out in || compare out out16 || fail=1 + + # On platforms where wchar_t is only 16 bits, wchar_t cannot represent + # the character encoded in 'in', so accept that behavior too. + compare out in || compare /dev/null out || fail=1 done Exit $fail |