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 | |
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.
-rw-r--r-- | THANKS | 3 | ||||
-rw-r--r-- | tests/char-class-multibyte | 7 | ||||
-rw-r--r-- | tests/fgrep-infloop | 1 | ||||
-rw-r--r-- | tests/prefix-of-multibyte | 2 |
4 files changed, 7 insertions, 6 deletions
@@ -22,7 +22,7 @@ David Clissold <cliss@austin.ibm.com> David J MacKenzie <djm@catapult.va.pubnix.com> David O'Brien <obrien@freebsd.org> Dmitry V. Levin <ldv@altlinux.org> -Egmont Koblinger <egmont@uhulinux.hu> +Egmont Koblinger <egmont@gmail.com> Eli Zaretskii <eliz@is.elta.co.il> Eric Blake <eblake@redhat.com> Florian La Roche <laroche@redhat.com> @@ -54,6 +54,7 @@ Kazuro Furukawa <furukawa@apricot.kek.jp> Keith Bostic <bostic@bsdi.com> Krishna Sethuraman <krishna@sgihub.corp.sgi.com> Kurt D Schwehr <kdschweh@insci14.ucsd.edu> +Ludovic Courtès <ludo@gnu.org> Mark Waite <markw@mddmew.fc.hp.com> Martin P.J. Zinser <zinser@decus.de> Martin Rex <martin.rex@sap-ag.de> 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 |