diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-06-11 15:03:31 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-06-11 15:03:31 +0200 |
commit | 700f6cd86b939789e19fd325f3ad2862eac5975e (patch) | |
tree | bc8290ddb061dccfcde2472452363a3620b5a9e9 | |
parent | c84f25bccebb1ba557ace597370d88bc8f5382e6 (diff) | |
download | guile-700f6cd86b939789e19fd325f3ad2862eac5975e.tar.gz |
i18n: Adjust tests for Windows.
* test-suite/tests/i18n.test (mingw?): New variable.
(%french-locale-name, %french-utf8-locale-name,
%turkish-utf8-locale-name, %german-utf8-locale-name,
%greek-utf8-locale-name): Add name of corresponding Windows codepage,
when MINGW? is true.
(under-turkish-utf8-locale-or-unresolved): Add exception for
"mingw32".
Co-authored-by: Eli Zaretskii <eliz@gnu.org>
-rw-r--r-- | test-suite/tests/i18n.test | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/test-suite/tests/i18n.test b/test-suite/tests/i18n.test index 68ae38c23..c63e3ac5b 100644 --- a/test-suite/tests/i18n.test +++ b/test-suite/tests/i18n.test @@ -81,20 +81,36 @@ (make-locale (list LC_COLLATE) "C"))))) +(define mingw? + (string-contains %host-type "-mingw32")) + (define %french-locale-name - "fr_FR.ISO-8859-1") + (if mingw? + "fra_FRA.850" + "fr_FR.ISO-8859-1")) + +;; What we really want for the following locales is that they be Unicode +;; capable, not necessarily UTF-8, which Windows does not provide. (define %french-utf8-locale-name - "fr_FR.UTF-8") + (if mingw? + "fra_FRA.1252" + "fr_FR.UTF-8")) (define %turkish-utf8-locale-name - "tr_TR.UTF-8") + (if mingw? + "tur_TRK.1254" + "tr_TR.UTF-8")) (define %german-utf8-locale-name - "de_DE.UTF-8") + (if mingw? + "deu_DEU.1252" + "de_DE.UTF-8")) (define %greek-utf8-locale-name - "el_GR.UTF-8") + (if mingw? + "grc_ELL.1253" + "el_GR.UTF-8")) (define %american-english-locale-name "en_US") @@ -148,13 +164,14 @@ (under-locale-or-unresolved %french-utf8-locale thunk)) (define (under-turkish-utf8-locale-or-unresolved thunk) - ;; FreeBSD 8.2 and 9.1, Solaris 2.10, and Darwin 8.11.0 have a broken - ;; tr_TR locale where `i' is mapped to uppercase `I' instead of `İ', - ;; so disable tests on that platform. + ;; FreeBSD 8.2 and 9.1, Solaris 2.10, Darwin 8.11.0, and MinGW have + ;; a broken tr_TR locale where `i' is mapped to uppercase `I' + ;; instead of `İ', so disable tests on that platform. (if (or (string-contains %host-type "freebsd8") (string-contains %host-type "freebsd9") (string-contains %host-type "solaris2.10") - (string-contains %host-type "darwin8")) + (string-contains %host-type "darwin8") + (string-contains %host-type "mingw32")) (throw 'unresolved) (under-locale-or-unresolved %turkish-utf8-locale thunk))) @@ -192,7 +209,7 @@ ;; strings. (dynamic-wind (lambda () - (setlocale LC_ALL "fr_FR.UTF-8")) + (setlocale LC_ALL %french-utf8-locale-name)) (lambda () (string-locale-ci=? "œuf" "ŒUF")) (lambda () |