diff options
author | Jim Meyering <meyering@fb.com> | 2016-11-28 14:16:18 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2016-11-28 14:17:07 -0800 |
commit | b7c4caec669d18ac7c5a692c10da7ddcc0e1f2a5 (patch) | |
tree | 3506983bc6387c4dea00cb30e4ef752f36ece493 /tests/false-match-mb-non-utf8 | |
parent | 03b491dd84986bf52df10d6dd0395240f1f18ed4 (diff) | |
download | grep-b7c4caec669d18ac7c5a692c10da7ddcc0e1f2a5.tar.gz |
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.
Diffstat (limited to 'tests/false-match-mb-non-utf8')
-rwxr-xr-x | tests/false-match-mb-non-utf8 | 8 |
1 files changed, 4 insertions, 4 deletions
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 |