diff options
author | Bruno Haible <bruno@clisp.org> | 2021-01-01 15:00:48 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-01-01 18:12:01 +0100 |
commit | 2b6c70dbc41f54f7de70d1ef64dd794f34c8883c (patch) | |
tree | b7f990ae31cec965b3f103f5d30acedcab565c9b /tests/test-quotearg.sh | |
parent | be147a9ba1f14fbec0641206ebc2562be1275d1b (diff) | |
download | gnulib-2b6c70dbc41f54f7de70d1ef64dd794f34c8883c.tar.gz |
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.
Diffstat (limited to 'tests/test-quotearg.sh')
-rwxr-xr-x | tests/test-quotearg.sh | 27 |
1 files changed, 26 insertions, 1 deletions
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 |