From 1569ee170b8eb3e5a03ca3d7d53e71fd05fd08e5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 30 Oct 2016 11:51:34 -0700 Subject: 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. --- tests/pcre-jitstack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/pcre-jitstack') diff --git a/tests/pcre-jitstack b/tests/pcre-jitstack index b473b128..a7bca79b 100755 --- a/tests/pcre-jitstack +++ b/tests/pcre-jitstack @@ -52,8 +52,8 @@ if test $? != 1; then # Rerun that same test, but now with no limit on stack size: (ulimit -s unlimited; - LC_ALL=C grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt) - test $? = 1 || fail=1 + LC_ALL=C returns_ 1 grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt) \ + || fail=1 fi Exit $fail -- cgit v1.2.1