]> diplodocus.org Git - nmh/blobdiff - test/common.sh.in
Removed msh relics from scansbr.c, including a global.
[nmh] / test / common.sh.in
index a0088087be75ffdf59ba54b5feec81aad2a06fc1..f4225e1b62c35c85e4d6e459390e0c6f1db20d3b 100644 (file)
@@ -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 ()