From b7c4caec669d18ac7c5a692c10da7ddcc0e1f2a5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 28 Nov 2016 14:16:18 -0800 Subject: tests: use "returns_ N env VAR=val ..." rather than "VAR=val returns_ N ..." Some shells do not propagate envvar settings through our use of the "returns_" function, so set any envvar via use of "env". This was an issue at least on Ubuntu and Debian-based systems, presumably due to their common use of "dash" as /bin/sh. Reported by Assaf Gordon. * tests/char-class-multibyte: As above. * tests/euc-mb: Likewise. * tests/false-match-mb-non-utf8: Likewise. * tests/pcre-infloop: Likewise. * tests/pcre-jitstack: Likewise. * tests/sjis-mb: Likewise. * tests/warn-char-classes: Likewise. --- tests/false-match-mb-non-utf8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/false-match-mb-non-utf8') diff --git a/tests/false-match-mb-non-utf8 b/tests/false-match-mb-non-utf8 index 6dfd10a5..c7727939 100755 --- a/tests/false-match-mb-non-utf8 +++ b/tests/false-match-mb-non-utf8 @@ -22,17 +22,17 @@ test "$(get-mb-cur-max $loc)" = 4 || skip_ "no support for the $loc locale" # of four bytes, the last of which is the digit, 7, and grep's DFA # matcher would mistakenly report that ".*7" matches that input line. printf '\2010\2077\n' > in || framework_failure_ -LC_ALL=$loc returns_ 1 grep -E '.*7' in || fail=1 +returns_ 1 env LC_ALL=$loc grep -E '.*7' in || fail=1 -LC_ALL=$loc returns_ 1 grep -E '.{0,1}7' in || fail=1 +returns_ 1 env LC_ALL=$loc grep -E '.{0,1}7' in || fail=1 -LC_ALL=$loc returns_ 1 grep -E '.?7' in || fail=1 +returns_ 1 env LC_ALL=$loc grep -E '.?7' in || fail=1 # Similar for the \ue9 code point, which ends in an "m" byte. loc=zh_HK.big5hkscs test "$(get-mb-cur-max $loc)" = 2 || skip_ "no support for the $loc locale" printf '\210m\n' > in || framework_failure_ -LC_ALL=$loc returns_ 1 grep '.*m' in || fail=1 +returns_ 1 env LC_ALL=$loc grep '.*m' in || fail=1 Exit $fail -- cgit v1.2.1