diff options
author | Jim Meyering <meyering@redhat.com> | 2012-04-22 10:34:08 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-04-22 10:34:51 +0200 |
commit | 90f12a213194cf5c9f893735bfff436a16ce1fa1 (patch) | |
tree | bdf333e722423012000143a567bd9fcbd715abba | |
parent | 42f01d28b1dc12b69d5bafb5697c9e8257574b3b (diff) | |
download | grep-90f12a213194cf5c9f893735bfff436a16ce1fa1.tar.gz |
tests: avoid spurious quote-mismatch failure on OS/X
* tests/in-eq-out-infloop: Simplify expected error output, eliminating
expected quotes altogether, thus avoiding spurious OS/X-specific
failure due to mismatch of multi-byte vs. single-byte quotes.
-rwxr-xr-x | tests/in-eq-out-infloop | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/in-eq-out-infloop b/tests/in-eq-out-infloop index 0ef408a6..17428256 100755 --- a/tests/in-eq-out-infloop +++ b/tests/in-eq-out-infloop @@ -15,16 +15,15 @@ done echo "$v" > out || framework_failure_ for arg in out - ''; do - case $arg in - out) echo "grep: input file 'out' is also the output";; - *) echo "grep: input file '(standard input)' is also the output";; - esac > err.exp || framework_failure_ + # Accommodate both 'out' and '(standard input)', as well as + # the multi-byte quoting we see on OS/X-based systems. + echo grep: input file ... is also the output > err.exp || framework_failure_ # Require an exit status of 2. # grep-2.8 and earlier would infloop with $arg = out. # grep-2.10 and earlier would infloop with $arg = - or $arg = ''. - timeout 10 grep 0 $arg < out >> out 2> err; st=$? - test $st = 2 || fail=1 + timeout 10 grep 0 $arg < out >> out 2> err; st=$?; test $st = 2 || fail=1 + sed 's/file .* is/file ... is/' err > k && mv k err compare err.exp err || fail=1 # But with each of the following options it must not exit-2. |