diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | modules/quotearg-tests | 4 | ||||
-rwxr-xr-x | tests/test-quotearg.sh | 27 |
3 files changed, 37 insertions, 2 deletions
@@ -1,5 +1,13 @@ 2021-01-01 Bruno Haible <bruno@clisp.org> + quotearg tests: Avoid test failures on Solaris 11. + * modules/quotearg-tests (Makefile.am): Set host_os in + TESTS_ENVIRONMENT. + * tests/test-quotearg.sh: On Solaris 11 systems, make a copy of the fr/ + directory that contains the .mo file. + +2021-01-01 Bruno Haible <bruno@clisp.org> + maint: Update copyright notices in --version output. List the most recent year in which changes were made, per <https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html>. diff --git a/modules/quotearg-tests b/modules/quotearg-tests index aed92ce381..dc94b34afa 100644 --- a/modules/quotearg-tests +++ b/modules/quotearg-tests @@ -25,6 +25,8 @@ gt_LOCALE_FR_UTF8 Makefile.am: TESTS += test-quotearg.sh -TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' +TESTS_ENVIRONMENT += \ + LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ + host_os='@host_os@' check_PROGRAMS += test-quotearg test_quotearg_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIBINTL@ $(LIB_MBRTOWC) diff --git a/tests/test-quotearg.sh b/tests/test-quotearg.sh index ae3315356d..b9978671b9 100755 --- a/tests/test-quotearg.sh +++ b/tests/test-quotearg.sh @@ -22,5 +22,30 @@ if test $locale = French_France.1252; then locale=fr_FR.CP1252 fi -LOCALE=$locale LOCALEDIR="$srcdir/testlocale" \ +# Work around a bug on Solaris 11 systems with no GNU gettext installed. +# See gettext/gettext-tools/tests/init.cfg. +localedir="$srcdir/testlocale" +if test $locale != none && test $locale != fr; then + case "$host_os" in + solaris2.11) + mkdir -p testlocale + cp -a "$srcdir/testlocale/fr" "testlocale/$locale" + localedir="testlocale" + ;; + esac +fi + +LOCALE=$locale LOCALEDIR="$localedir" \ ${CHECKER} ./test-quotearg${EXEEXT} +result=$? + +if test $locale != none && test $locale != fr; then + case "$host_os" in + solaris2.11) + rm -rf "testlocale/$locale" + rmdir testlocale 2>/dev/null + ;; + esac +fi + +exit $result |