From 656f1ee45975aa9a262232abc835ba118d0d98ae Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Wed, 24 Jun 2015 10:53:22 +0900 Subject: [PATCH] tests: Skip CLDR tests when libexpat is missing * gettext-tools/tests/cldr-plurals-1: Skip if XML is not supported. * gettext-tools/tests/msginit-4: Likewise. --- gettext-tools/tests/ChangeLog | 5 +++++ gettext-tools/tests/cldr-plurals-1 | 6 ++++++ gettext-tools/tests/msginit-4 | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index dc7aa3e77..6c10a382b 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2015-06-24 Daiki Ueno + + * cldr-plurals-1: Skip if XML is not supported. + * msginit-4: Likewise. + 2015-06-24 Daiki Ueno * format-kde-kuit-1: Skip if KDE KUIT format is not supported. diff --git a/gettext-tools/tests/cldr-plurals-1 b/gettext-tools/tests/cldr-plurals-1 index 15f390968..e593812ae 100755 --- a/gettext-tools/tests/cldr-plurals-1 +++ b/gettext-tools/tests/cldr-plurals-1 @@ -5,6 +5,12 @@ # Test conversion from CLDR to gettext, for Arabic and Russian +LC_ALL=C "$top_builddir/src/cldr-plurals" ru /dev/null 2>&1 | grep 'extraction is not supported' > /dev/null 2>&1 +test $? = 0 && { + echo "Skipping test: cldr-plurals was built without XML support" + exit 77 +} + cat > ar.ok <<\EOF nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5); EOF diff --git a/gettext-tools/tests/msginit-4 b/gettext-tools/tests/msginit-4 index 161914ec0..369f15202 100755 --- a/gettext-tools/tests/msginit-4 +++ b/gettext-tools/tests/msginit-4 @@ -2,6 +2,13 @@ . "${srcdir=.}/init.sh"; path_prepend_ . ../src # Test filling Plural-Forms: with Unicode CLDR + +LC_ALL=C "$top_builddir/src/cldr-plurals" ru /dev/null 2>&1 | grep 'extraction is not supported' > /dev/null 2>&1 +test $? = 0 && { + echo "Skipping test: cldr-plurals was built without XML support" + exit 77 +} + cat <<\EOF > mi-test4.pot # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -- 2.47.2