From: Bruno Haible Date: Fri, 19 Jul 2024 01:25:00 +0000 (+0200) Subject: lang-guile: Avoid FAIL on Alpine Linux, macOS, NetBSD. X-Git-Tag: v0.23~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b240772b4782a7985736cfa949a3194cd6a5bd25;p=thirdparty%2Fgettext.git lang-guile: Avoid FAIL on Alpine Linux, macOS, NetBSD. * gettext-tools/tests/lang-guile: Mark the test as skipped when it does not produce the translations. --- diff --git a/gettext-tools/tests/lang-guile b/gettext-tools/tests/lang-guile index 886e01985..302eaf3aa 100755 --- a/gettext-tools/tests/lang-guile +++ b/gettext-tools/tests/lang-guile @@ -114,7 +114,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then Exit 77 fi -: ${DIFF=diff} +# Expected result when guile is built without i18n support. +cat <<\EOF > prog.nok +'Your command, please?', asked the waiter. +2 pieces of cake +FF is replaced by EUR. +EOF +# Expected result when guile is built with i18n support. cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau @@ -126,18 +132,28 @@ cat <<\EOF > prog.oku EUR remplace FF. EOF +: ${DIFF=diff} + : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then prepare_locale_ fr $LOCALE_FR LANGUAGE= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > prog.out 2>prog.err || { cat prog.err 1>&2; Exit 1; } grep -v '^;;;' prog.err 1>&2 + ${DIFF} prog.nok prog.out > /dev/null && { + echo "Skipping test: guile is built without i18n support" + Exit 77 + } ${DIFF} prog.ok prog.out || Exit 1 fi if test $LOCALE_FR_UTF8 != none; then prepare_locale_ fr $LOCALE_FR_UTF8 LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 guile -s prog.scm 2 > prog.out 2>prog.err || { cat prog.err 1>&2; Exit 1; } grep -v '^;;;' prog.err 1>&2 + ${DIFF} prog.nok prog.out > /dev/null && { + echo "Skipping test: guile is built without i18n support" + Exit 77 + } ${DIFF} prog.oku prog.out || Exit 1 fi