summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-05-02 12:22:34 +0200
committerJim Meyering <meyering@redhat.com>2011-09-15 14:07:05 +0200
commit46e5cc6fb27886af532e6f34c4491bd533637f7c (patch)
tree1d104010ab83446ac0f64c56d6a68d0a59a98b8c /tests
parent86ff96a57b2e9aa66096839cc39e1404a3f954af (diff)
downloadgrep-46e5cc6fb27886af532e6f34c4491bd533637f7c.tar.gz
tests: skip tests that require MBS support
* tests/init.cfg (require_compiled_in_MB_support): New function. * tests/char-class-multibyte: Use it here, since this test cannot succeed without MBS support. * tests/equiv-classes: Likewise. * tests/euc-mb: Likewise. * tests/fgrep-infloop: Likewise. * tests/init.cfg: Likewise. * tests/prefix-of-multibyte: Likewise. * tests/turkish-I: Likewise. * tests/sjis-mb: Likewise.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/char-class-multibyte1
-rwxr-xr-xtests/equiv-classes1
-rwxr-xr-xtests/euc-mb2
-rwxr-xr-xtests/fgrep-infloop1
-rw-r--r--tests/init.cfg7
-rwxr-xr-xtests/prefix-of-multibyte1
-rwxr-xr-xtests/sjis-mb1
-rwxr-xr-xtests/turkish-I1
8 files changed, 15 insertions, 0 deletions
diff --git a/tests/char-class-multibyte b/tests/char-class-multibyte
index 07d96200..88b8fa07 100755
--- a/tests/char-class-multibyte
+++ b/tests/char-class-multibyte
@@ -3,6 +3,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
require_en_utf8_locale_
+require_compiled_in_MB_support
printf 'é\n' > exp1 || framework_failure_
fail=0
diff --git a/tests/equiv-classes b/tests/equiv-classes
index de38d95c..940efa41 100755
--- a/tests/equiv-classes
+++ b/tests/equiv-classes
@@ -4,6 +4,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
require_en_utf8_locale_
+require_compiled_in_MB_support
LC_ALL=en_US.UTF-8
export LC_ALL
diff --git a/tests/euc-mb b/tests/euc-mb
index e6154f33..ee5ee611 100755
--- a/tests/euc-mb
+++ b/tests/euc-mb
@@ -7,6 +7,8 @@
# Add "." to PATH for the use of get-mb-cur-max.
path_prepend_ .
+require_compiled_in_MB_support
+
locale=ja_JP.EUC-JP
make_input () {
diff --git a/tests/fgrep-infloop b/tests/fgrep-infloop
index 908b7887..7ef82971 100755
--- a/tests/fgrep-infloop
+++ b/tests/fgrep-infloop
@@ -4,6 +4,7 @@
require_en_utf8_locale_
require_timeout_
+require_compiled_in_MB_support
encode() { echo "$1" | tr ABC '\357\274\241'; }
diff --git a/tests/init.cfg b/tests/init.cfg
index f6ead9c7..25e87f35 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -78,3 +78,10 @@ require_ru_RU_koi8_r()
*) skip_test_ 'ru_RU.KOI8-R locale not found' ;;
esac
}
+
+require_compiled_in_MB_support()
+{
+ require_en_utf8_locale_
+ printf 'é' | LC_ALL=en_US.UTF-8 grep '[[:lower:]]' \
+ || skip_ this test requires MBS support
+}
diff --git a/tests/prefix-of-multibyte b/tests/prefix-of-multibyte
index 05045b09..851e1f68 100755
--- a/tests/prefix-of-multibyte
+++ b/tests/prefix-of-multibyte
@@ -3,6 +3,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
require_en_utf8_locale_
+require_compiled_in_MB_support
encode() { echo "$1" | tr ABC '\357\274\241'; }
diff --git a/tests/sjis-mb b/tests/sjis-mb
index 07c9a9ab..b5a18dcb 100755
--- a/tests/sjis-mb
+++ b/tests/sjis-mb
@@ -8,6 +8,7 @@
# Add "." to PATH for the use of get-mb-cur-max.
path_prepend_ .
+require_compiled_in_MB_support
require_timeout_
locale=ja_JP.SHIFT_JIS
diff --git a/tests/turkish-I b/tests/turkish-I
index ac536c4d..d941ed17 100755
--- a/tests/turkish-I
+++ b/tests/turkish-I
@@ -19,6 +19,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
require_en_utf8_locale_
+require_compiled_in_MB_support
fail=0