diff options
author | Jim Meyering <meyering@redhat.com> | 2010-04-01 11:53:54 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-04-01 12:19:46 +0200 |
commit | f4d75a8bf63eb2f3b884768e0fefd3f4dd08107b (patch) | |
tree | fe3ac437be41d638dd552b937ac8c2f59694ed3b /tests | |
parent | 32d5db19e87a3a52fe67e028d828c136b659660b (diff) | |
download | grep-f4d75a8bf63eb2f3b884768e0fefd3f4dd08107b.tar.gz |
tests: add explicit requirement for en_US.UTF-8
* tests/char-class-multibyte: Use require_en_utf8_locale_,
rather than open-coding it.
* tests/prefix-of-multibyte: Require the locale explicitly.
* tests/fgrep-infloop: Likewise.
This fixes test failures that would arise on systems without
that particular locale. Reported by Ludovic Courtès.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/char-class-multibyte | 7 | ||||
-rw-r--r-- | tests/fgrep-infloop | 1 | ||||
-rw-r--r-- | tests/prefix-of-multibyte | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/char-class-multibyte b/tests/char-class-multibyte index 825e3adb..95220eef 100644 --- a/tests/char-class-multibyte +++ b/tests/char-class-multibyte @@ -1,12 +1,9 @@ #!/bin/sh # This would segfault for grep-2.6 : ${srcdir=.} -. "$srcdir/init.sh"; path_prepend_ . ../src +. "$srcdir/init.sh"; path_prepend_ ../src -case $(get-mb-cur-max en_US.UTF-8) in - [3456]) ;; - *) skip_ 'UTF-8 locale not found' ;; -esac +require_en_utf8_locale_ printf 'é\n' > exp1 || framework_failure_ fail=0 diff --git a/tests/fgrep-infloop b/tests/fgrep-infloop index 159baca5..74919184 100644 --- a/tests/fgrep-infloop +++ b/tests/fgrep-infloop @@ -3,6 +3,7 @@ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ ../src +require_en_utf8_locale_ require_timeout_ encode() { echo "$1" | tr ABC '\357\274\241'; } diff --git a/tests/prefix-of-multibyte b/tests/prefix-of-multibyte index f9e42bf1..c077b816 100644 --- a/tests/prefix-of-multibyte +++ b/tests/prefix-of-multibyte @@ -3,6 +3,8 @@ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ ../src +require_en_utf8_locale_ + encode() { echo "$1" | tr ABC '\357\274\241'; } fail=0 |