From: Jim Meyering <[email protected]>
* tests/init.cfg (require_compiled_in_MBS_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/char-class-multibyte | 1 +
tests/equiv-classes | 1 +
tests/euc-mb | 2 ++
tests/fgrep-infloop | 1 +
tests/init.cfg | 7 +++++++
tests/prefix-of-multibyte | 1 +
tests/turkish-I | 1 +
7 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/tests/char-class-multibyte b/tests/char-class-multibyte
index 07d9620..f35908a 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_MBS_support
printf 'é\n' > exp1 || framework_failure_
fail=0
diff --git a/tests/equiv-classes b/tests/equiv-classes
index de38d95..c9e7532 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_MBS_support
LC_ALL=en_US.UTF-8
export LC_ALL
diff --git a/tests/euc-mb b/tests/euc-mb
index e6154f3..32fa7be 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_MBS_support
+
locale=ja_JP.EUC-JP
make_input () {
diff --git a/tests/fgrep-infloop b/tests/fgrep-infloop
index 908b788..7499ae4 100755
--- a/tests/fgrep-infloop
+++ b/tests/fgrep-infloop
@@ -4,6 +4,7 @@
require_en_utf8_locale_
require_timeout_
+require_compiled_in_MBS_support
encode() { echo "$1" | tr ABC '\357\274\241'; }
diff --git a/tests/init.cfg b/tests/init.cfg
index f6ead9c..42889e6 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_MBS_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 05045b0..d409b18 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_MBS_support
encode() { echo "$1" | tr ABC '\357\274\241'; }
diff --git a/tests/turkish-I b/tests/turkish-I
index ac536c4..8f18d43 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_MBS_support
fail=0
--
1.7.7.rc0.362.g5a14