From: Bruno Haible Date: Fri, 9 Jun 2006 20:24:52 +0000 (+0000) Subject: Provide better SKIP explanations. X-Git-Tag: v0.15~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13655b1609a60acaf06a06f5d5554f85aee65351;p=thirdparty%2Fgettext.git Provide better SKIP explanations. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index c3f5833e6..7976eb81b 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,10 @@ +2006-06-04 Bruno Haible + + Provide better SKIP explanations. + * lang-pascal (UTF8_LOCALE_UNSUPPORTED): New variable. + * lang-python-1: Likewise. + * lang-python-2: Likewise. + 2006-06-03 Bruno Haible * lang-php: Fix version recognition for PHP 4. diff --git a/gettext-tools/tests/lang-pascal b/gettext-tools/tests/lang-pascal index 4c5858141..a1af05721 100755 --- a/gettext-tools/tests/lang-pascal +++ b/gettext-tools/tests/lang-pascal @@ -6,7 +6,7 @@ # Note: This test fails with fpk 1.0.10 when an UTF-8 locale is present, # because fpk ignores the locale's encoding. It supports only unibyte locales. # This here is a quick workaround: -LOCALE_FR_UTF8=none +UTF8_LOCALE_UNSUPPORTED=yes tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 @@ -102,18 +102,29 @@ if test $LOCALE_FR != none; then : ${DIFF=diff} ${DIFF} prog.ok prog.out || exit 1 fi -if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./prog > prog.out || exit 1 - : ${DIFF=diff} - ${DIFF} prog.oku prog.out || exit 1 -fi -if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french locale is installed" - else - echo "Skipping test: no french locale is supported" +if test -z "$UTF8_LOCALE_UNSUPPORTED"; then + if test $LOCALE_FR_UTF8 != none; then + LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./prog > prog.out || exit 1 + : ${DIFF=diff} + ${DIFF} prog.oku prog.out || exit 1 + fi + if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no french locale is installed" + else + echo "Skipping test: no french locale is supported" + fi + rm -fr $tmpfiles; exit 77 + fi +else + if test $LOCALE_FR = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no traditional french locale is installed" + else + echo "Skipping test: no traditional french locale is supported" + fi + rm -fr $tmpfiles; exit 77 fi - rm -fr $tmpfiles; exit 77 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-python-1 b/gettext-tools/tests/lang-python-1 index 7d38235d5..53dc8226d 100755 --- a/gettext-tools/tests/lang-python-1 +++ b/gettext-tools/tests/lang-python-1 @@ -4,7 +4,7 @@ # Note: This test fails with Python 2.3, 2.4 when an UTF-8 locale is present. # It looks like a bug in Python's gettext.py. This here is a quick workaround: -LOCALE_FR_UTF8=none +UTF8_LOCALE_UNSUPPORTED=yes tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 @@ -93,17 +93,28 @@ if test $LOCALE_FR != none; then LANGUAGE= LC_ALL=$LOCALE_FR python prog.py > prog.out || exit 1 ${DIFF} prog.ok prog.out || exit 1 fi -if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 -fi -if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french locale is installed" - else - echo "Skipping test: no french locale is supported" +if test -z "$UTF8_LOCALE_UNSUPPORTED"; then + if test $LOCALE_FR_UTF8 != none; then + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 + fi + if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no french locale is installed" + else + echo "Skipping test: no french locale is supported" + fi + rm -fr $tmpfiles; exit 77 + fi +else + if test $LOCALE_FR = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no traditional french locale is installed" + else + echo "Skipping test: no traditional french locale is supported" + fi + rm -fr $tmpfiles; exit 77 fi - rm -fr $tmpfiles; exit 77 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-python-2 b/gettext-tools/tests/lang-python-2 index b1e10c7b9..3371eee55 100755 --- a/gettext-tools/tests/lang-python-2 +++ b/gettext-tools/tests/lang-python-2 @@ -5,7 +5,7 @@ # Note: This test fails with Python 2.3, 2.4 when an UTF-8 locale is present. # It looks like a bug in Python's gettext.py. This here is a quick workaround: -LOCALE_FR_UTF8=none +UTF8_LOCALE_UNSUPPORTED=yes tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 @@ -114,17 +114,28 @@ if test $LOCALE_FR != none; then LANGUAGE= LC_ALL=$LOCALE_FR python prog.py 2 > prog.out || exit 1 ${DIFF} prog.ok prog.out || exit 1 fi -if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py 2 > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 -fi -if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french locale is installed" - else - echo "Skipping test: no french locale is supported" +if test -z "$UTF8_LOCALE_UNSUPPORTED"; then + if test $LOCALE_FR_UTF8 != none; then + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py 2 > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 + fi + if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no french locale is installed" + else + echo "Skipping test: no french locale is supported" + fi + rm -fr $tmpfiles; exit 77 + fi +else + if test $LOCALE_FR = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no traditional french locale is installed" + else + echo "Skipping test: no traditional french locale is supported" + fi + rm -fr $tmpfiles; exit 77 fi - rm -fr $tmpfiles; exit 77 fi rm -fr $tmpfiles