quotearg test: Avoid test failure on mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Feb 2011 02:41:41 +0000 (03:41 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Feb 2011 02:41:41 +0000 (03:41 +0100)
* tests/test-quotearg.sh: Convert the locale identifier from native
Windows syntax to Unix syntax.

ChangeLog
tests/test-quotearg.sh

index f3599797a52fce50532ba5554841bcbc8b3ae048..02c69df863cdaf3011fed8d7c1cd0bfbe2ffc99d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-12  Bruno Haible  <bruno@clisp.org>
+
+       quotearg test: Avoid test failure on mingw.
+       * tests/test-quotearg.sh: Convert the locale identifier from native
+       Windows syntax to Unix syntax.
+
 2011-02-12  Bruno Haible  <bruno@clisp.org>
 
        setlocale: Prefer gnulib's override over libintl's override.
index e050d0788c8906ad3c1a9d865b6e4dc630467de1..4dd718880c924b66e38d215a8f35bbab3d4cf734 100755 (executable)
@@ -12,5 +12,15 @@ else
   fi
 fi
 
+# Work around a limitation of gettext() on native Windows in gettext 0.18.1:
+# the locale identifiers in the environment variables LC_ALL etc. have to
+# be in Unix conventions, not in native Window conventions.
+if test $locale = French_France.65001; then
+  locale=fr_FR.UTF-8
+fi
+if test $locale = French_France.1252; then
+  locale=fr_FR.CP1252
+fi
+
 LOCALE=$locale LOCALEDIR="$srcdir/locale" \
 ./test-quotearg${EXEEXT}