>From 315c80417556cc46c48fdf51ccf27e1d95e9f85a Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Thu, 5 Oct 2017 23:35:35 -0600 Subject: [PATCH 3/3] tests: skip utf8-ru test if required locale is not found Reported by Dennis Clarke in https://bugs.gnu.org/28665#14 . * init.cfg (require_ru_utf8_locale_): New function. * testsuite/utf8-ru.sh: Skip test is required locale was not found. --- init.cfg | 11 +++++++++++ testsuite/utf8-ru.sh | 1 + 2 files changed, 12 insertions(+) diff --git a/init.cfg b/init.cfg index a15041c..be7b523 100644 --- a/init.cfg +++ b/init.cfg @@ -59,6 +59,17 @@ require_en_utf8_locale_() esac } +# Some tests would fail without this particular locale. +# If the locale is not available, just skip the test. +require_ru_utf8_locale_() +{ + path_prepend_ ./testsuite + case $(get-mb-cur-max ru_RU.UTF-8) in + [3456]) ;; + *) skip_ 'ru_RU.UTF-8 locale not found' ;; + esac +} + require_el_iso88597_locale_() { path_prepend_ ./testsuite diff --git a/testsuite/utf8-ru.sh b/testsuite/utf8-ru.sh index c47b060..d8787f7 100644 --- a/testsuite/utf8-ru.sh +++ b/testsuite/utf8-ru.sh @@ -21,6 +21,7 @@ . "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed print_ver_ sed +require_ru_utf8_locale_ fail=0 -- 2.7.4