diff options
author | Jim Meyering <meyering@fb.com> | 2017-06-29 18:06:11 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2017-07-01 09:30:51 -0700 |
commit | 9fbc2fb1823c71a9d3370e0b04886c5994000fa8 (patch) | |
tree | 4c7866f579ce32503a97fee1a45f498d21d31416 /tests/reversed-range-endpoints | |
parent | bdce7a23e55e82efa429e001dd6f2979d7f5d351 (diff) | |
download | grep-9fbc2fb1823c71a9d3370e0b04886c5994000fa8.tar.gz |
tests: avoid false failures when run in qemu user mode
* tests/filename-lineno.pl: Derive the program name that grep
will use in diagnostics, based on a suggestion from Assaf Gordon.
* tests/in-eq-out-infloop: Similar: accept an arbitrary "command_name: "
prefix on checked diagnostics, rather than requiring "grep: ".
* tests/reversed-range-endpoints: Likewise.
* tests/write-error-msg: Likewise.
Reported by Bruno Haible in http://bugs.gnu.org/27532
Diffstat (limited to 'tests/reversed-range-endpoints')
-rwxr-xr-x | tests/reversed-range-endpoints | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/reversed-range-endpoints b/tests/reversed-range-endpoints index 07374478..4c2193cf 100755 --- a/tests/reversed-range-endpoints +++ b/tests/reversed-range-endpoints @@ -4,13 +4,13 @@ fail=0 -printf 'Invalid range end\n' > exp +printf 'grep: Invalid range end\n' > exp for prog in grep 'grep -E'; do # exit status must be 2, not 1 returns_ 2 $prog '[b-a]' < /dev/null > out 2>&1 || fail=1 - # Remove "$prog: " prefix from actual output. - sed 's/^[grep]*: //' out > k && mv k out + # Normalize the diagnostic prefix from e.g., "/mnt/dir/grep: " to "grep: " + sed 's/^[^:]*: /grep: /' out > k && mv k out compare exp out || fail=1 done |