]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
lang-bash: Fix handling of macOS bash.
authorBruno Haible <bruno@clisp.org>
Tue, 16 Jul 2024 12:52:29 +0000 (14:52 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 16 Jul 2024 12:52:29 +0000 (14:52 +0200)
* gettext-tools/tests/lang-bash: Don't test whether bash is localized. Instead,
on macOS, test only in the UTF-8 locale.

gettext-tools/tests/lang-bash

index 268ec32641109fd306857b25715b8ad34a1fc2b8..65c6eb9f2fd3e02412c8e4567ff25a0d4a4a6d08 100755 (executable)
@@ -95,6 +95,10 @@ esac
 # Test which of the fr_FR locales are installed.
 : ${LOCALE_FR=fr_FR}
 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+# bash on macOS supports only UTF-8 locales.
+case "$host_os" in
+  darwin*) LOCALE_FR=none ;;
+esac
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR ../testlocale
   case $? in
@@ -120,19 +124,6 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
   Exit 77
 fi
 
-case "$host_os" in
-  darwin*)
-    if test $LOCALE_FR != none; then
-      LC_ALL=$LOCALE_FR bash --help \
-        | grep '^Utilisation' > /dev/null 2>&1 || Exit 77
-    fi
-    if test $LOCALE_FR_UTF8 != none; then
-      LC_ALL=$LOCALE_FR_UTF8 bash --help \
-        | grep '^Utilisation' > /dev/null 2>&1 || Exit 77
-    fi
-  ;;
-esac
-
 # Expected result when bash is built without i18n support.
 cat <<\EOF > prog.nok
 'Your command, please?', asked the waiter.