X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6b1962e92b9a3bfc7570aecb844fe67141fb87d7..58eaf2c22189e6cd823eb6eb3afe2e52a2599482:/test/common.sh.in?ds=sidebyside diff --git a/test/common.sh.in b/test/common.sh.in index a0088087..f4225e1b 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -85,6 +85,18 @@ require_prog () fi } +# Skip test if none of the offered locales are supported. +require_locale () +{ + for locale in "$@"; do + if locale -a | grep -i "$locale" >/dev/null; then + return + fi + done + + test_skip "no suitable locale available" +} + # Some stuff for doing silly progress indicators if [ -t 1 ] ; then progress_update ()