summaryrefslogtreecommitdiff
path: root/tests/pcre-abort
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/pcre-abort
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/pcre-abort')
-rwxr-xr-xtests/pcre-abort3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/pcre-abort b/tests/pcre-abort
index 5e9fdf2f..83c90e44 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -14,8 +14,7 @@ require_pcre_
fail=0
echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab > in || framework_failure_
-grep -P '((a+)*)+$' in > out
-test $? = 2 || fail=1
+returns_ 2 grep -P '((a+)*)+$' in > out || fail=1
compare /dev/null out || fail=1
Exit $fail