summaryrefslogtreecommitdiff
path: root/tests/init.cfg
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-01 11:45:23 +0200
committerJim Meyering <meyering@redhat.com>2010-04-01 11:49:06 +0200
commit32d5db19e87a3a52fe67e028d828c136b659660b (patch)
treed5dbbdad8d50a490639f838bb84351c486ea25ff /tests/init.cfg
parentde88933b28523882e38ca5332791cb55d85ce9ee (diff)
downloadgrep-32d5db19e87a3a52fe67e028d828c136b659660b.tar.gz
tests: new function, to require an en_US UTF8 locale
* tests/init.cfg (require_en_utf8_locale_): New function.
Diffstat (limited to 'tests/init.cfg')
-rw-r--r--tests/init.cfg11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/init.cfg b/tests/init.cfg
index 6f957b30..8fc8c328 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -38,3 +38,14 @@ require_timeout_()
( timeout --version ) > /dev/null 2>&1 \
|| skip_ your system lacks the timeout program
}
+
+# Some tests would fail without this particular locale.
+# If the locale is not available, just skip the test.
+require_en_utf8_locale_()
+{
+ path_prepend_ .
+ case $(get-mb-cur-max en_US.UTF-8) in
+ [3456]) ;;
+ *) skip_ 'en_US.UTF-8 locale not found' ;;
+ esac
+}