From: Bruno Haible Date: Wed, 20 Sep 2023 09:03:35 +0000 (+0200) Subject: Fix intl-7 test failure on Solaris 11. X-Git-Tag: v0.23~370 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=239322dc8512d5d5832d2517e4095223c217342d;p=thirdparty%2Fgettext.git Fix intl-7 test failure on Solaris 11. * gettext-tools/tests/init.cfg (prepare_locale_): Preserve the existing contents of "$2". * gettext-tools/tests/intl-7: While calling prepare_locale_, ensure that fr_FR has higher priority than fr. --- diff --git a/gettext-tools/tests/init.cfg b/gettext-tools/tests/init.cfg index 3b814814d..4994c4137 100644 --- a/gettext-tools/tests/init.cfg +++ b/gettext-tools/tests/init.cfg @@ -22,7 +22,19 @@ prepare_locale_ () if test "$1" != "$2" && test "$GLIBC2" = no; then case "$host_os" in solaris2.11) - cp -R "$1" "$2" + # Copy the contents of "$1" into "$2", preserving the existing contents + # of "$2". + mkdir -p "$2" + for d in `cd "$1" && find . -type d -print | grep -v '^[.]$' | sed -e 's|^[.]/||'`; do + mkdir -p "$2/$d" + done + for f in `cd "$1" && find . -type f -print`; do + if test -f "$2/$f"; then + : + else + ln "$1/$f" "$2/$f" + fi + done ;; esac fi diff --git a/gettext-tools/tests/intl-7 b/gettext-tools/tests/intl-7 index 59a2fd8ea..1876c7efa 100755 --- a/gettext-tools/tests/intl-7 +++ b/gettext-tools/tests/intl-7 @@ -108,8 +108,8 @@ if test $LOCALE_FR != none; then # they are not supported in the fr_FR.ISO-8859-1 locale. ;; *) - prepare_locale_ in-7/fr in-7/$LOCALE_FR prepare_locale_ in-7/fr_FR in-7/$LOCALE_FR + prepare_locale_ in-7/fr in-7/$LOCALE_FR prepare_locale_ "${ldir}"/fr "${ldir}"/$LOCALE_FR ../intl-7-prg "${ldir}" in-7 $LOCALE_FR > in-7.tmp || Exit 1 LC_ALL=C tr -d '\r' < in-7.tmp > in-7.out || Exit 1 @@ -118,8 +118,8 @@ if test $LOCALE_FR != none; then esac fi if test $LOCALE_FR_UTF8 != none; then - prepare_locale_ in-7/fr in-7/$LOCALE_FR_UTF8 prepare_locale_ in-7/fr_FR in-7/$LOCALE_FR_UTF8 + prepare_locale_ in-7/fr in-7/$LOCALE_FR_UTF8 prepare_locale_ "${ldir}"/fr "${ldir}"/$LOCALE_FR_UTF8 ../intl-7-prg "${ldir}" in-7 $LOCALE_FR_UTF8 > in-7.tmp || Exit 1 LC_ALL=C tr -d '\r' < in-7.tmp > in-7.out || Exit 1