]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix intl-7 test failure on Solaris 11.
authorBruno Haible <bruno@clisp.org>
Wed, 20 Sep 2023 09:03:35 +0000 (11:03 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 20 Sep 2023 09:03:35 +0000 (11:03 +0200)
* 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.

gettext-tools/tests/init.cfg
gettext-tools/tests/intl-7

index 3b814814d446286cca9acec508972c1bc47b7c9c..4994c4137b677962d793014305fd2899d0dfba44 100644 (file)
@@ -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
index 59a2fd8eadb9e0fdb9ffa2deea44600719e070ba..1876c7efa9f6406ef8517bceb6eecf60530f9f1c 100755 (executable)
@@ -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