summaryrefslogtreecommitdiff
path: root/tests/surrogate-pair
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2016-10-30 11:51:34 -0700
committerJim Meyering <meyering@fb.com>2016-11-14 19:12:22 -0800
commit1569ee170b8eb3e5a03ca3d7d53e71fd05fd08e5 (patch)
treeda31c08048a0f959ab8bd0ab7503264a8d3fc69c /tests/surrogate-pair
parent735085b7935ef12a9e6b7c42a99450f9e5497491 (diff)
downloadgrep-1569ee170b8eb3e5a03ca3d7d53e71fd05fd08e5.tar.gz
tests: use "returns_" rather than explicit comparison with "$?"
* tests/sjis-mb (encode): Rearrange to emit desired input into a file, rather than piping directly into grep. That permits the use of returns_ 1 to verify timeout's exit status. * tests/euc-mb: Use "returns_ 1" rather than testing $? = 1 * tests/char-class-multibyte: Likewise. * tests/dfa-heap-overrun: Likewise. * tests/encoding-error: Likewise. * tests/fedora: Likewise. * tests/grep-dev-null: Likewise. * tests/init.cfg (envvar_check_fail): Likewise. * tests/kwset-abuse: Likewise. * tests/mb-non-UTF8-overrun: Likewise. * tests/multibyte-white-space: Likewise. * tests/pcre-infloop: Likewise. * tests/surrogate-pair: Likewise. * tests/warn-char-classes: Likewise. Do the same for other values: * tests/backref-multibyte-slow: Likewise. * tests/euc-mb: Likewise. * tests/pcre-abort: Likewise. * tests/pcre-jitstack: Likewise. * tests/repetition-overflow: Likewise. * tests/reversed-range-endpoints: Likewise. * tests/warn-char-classes: Likewise.
Diffstat (limited to 'tests/surrogate-pair')
-rwxr-xr-xtests/surrogate-pair3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/surrogate-pair b/tests/surrogate-pair
index 93eeb5a6..38a2a558 100755
--- a/tests/surrogate-pair
+++ b/tests/surrogate-pair
@@ -29,9 +29,8 @@ LC_ALL=en_US.UTF-8
export LC_ALL
# On Cygwin, before grep-2.15, this would segfault.
-grep -i anything-else in > out 2>&1
# Require not just non-zero exit status, but exactly 1.
-test $? = 1 || fail=1
+returns_ 1 grep -i anything-else in > out 2>&1 || fail=1
# Expect no output.
compare /dev/null out || fail=1