From: Bruno Haible Date: Fri, 16 Aug 2024 18:53:13 +0000 (+0200) Subject: xgettext: Scheme: Reorganize tests. X-Git-Tag: v0.23~164 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ea34921f4c37611825e1b023611d450a268522b;p=thirdparty%2Fgettext.git xgettext: Scheme: Reorganize tests. * gettext-tools/tests/xgettext-scheme-format-1: Renamed from gettext-tools/tests/xgettext-scheme-5. * gettext-tools/tests/xgettext-scheme-format-2: Renamed from gettext-tools/tests/xgettext-scheme-6. * gettext-tools/tests/Makefile.am (TESTS): Update. --- diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index cd06a0d6e..5315aa3d2 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -153,7 +153,8 @@ TESTS = gettext-1 gettext-2 \ xgettext-python-stackovfl-3 xgettext-python-stackovfl-4 \ xgettext-ruby-1 \ xgettext-scheme-1 xgettext-scheme-2 xgettext-scheme-3 \ - xgettext-scheme-4 xgettext-scheme-5 xgettext-scheme-6 \ + xgettext-scheme-4 \ + xgettext-scheme-format-1 xgettext-scheme-format-2 \ xgettext-scheme-stackovfl-1 xgettext-scheme-stackovfl-2 \ xgettext-sh-1 xgettext-sh-2 xgettext-sh-3 xgettext-sh-4 xgettext-sh-5 \ xgettext-sh-6 xgettext-sh-7 xgettext-sh-8 \ diff --git a/gettext-tools/tests/xgettext-scheme-5 b/gettext-tools/tests/xgettext-scheme-5 deleted file mode 100755 index 26cd2adc5..000000000 --- a/gettext-tools/tests/xgettext-scheme-5 +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -. "${srcdir=.}/init.sh"; path_prepend_ . ../src - -# Test Scheme support: scheme-format string with a loop. - -cat <<\EOF > xg-sc-5.scm -(_ "~{~*~}") -EOF - -: ${XGETTEXT=xgettext} -${XGETTEXT} -k_ --omit-header --no-location -d xg-sc-5.tmp xg-sc-5.scm || Exit 1 -LC_ALL=C tr -d '\r' < xg-sc-5.tmp.po > xg-sc-5.po || Exit 1 - -cat <<\EOF > xg-sc-5.ok -#, scheme-format -msgid "~{~*~}" -msgstr "" -EOF - -: ${DIFF=diff} -${DIFF} xg-sc-5.ok xg-sc-5.po -result=$? - -exit $result diff --git a/gettext-tools/tests/xgettext-scheme-format-1 b/gettext-tools/tests/xgettext-scheme-format-1 new file mode 100755 index 000000000..4fe9a6e41 --- /dev/null +++ b/gettext-tools/tests/xgettext-scheme-format-1 @@ -0,0 +1,24 @@ +#! /bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src + +# Test Scheme support: scheme-format string with a loop. + +cat <<\EOF > xg-sc-format-1.scm +(_ "~{~*~}") +EOF + +: ${XGETTEXT=xgettext} +${XGETTEXT} -k_ --omit-header --no-location -d xg-sc-format-1.tmp xg-sc-format-1.scm || Exit 1 +LC_ALL=C tr -d '\r' < xg-sc-format-1.tmp.po > xg-sc-format-1.po || Exit 1 + +cat <<\EOF > xg-sc-format-1.ok +#, scheme-format +msgid "~{~*~}" +msgstr "" +EOF + +: ${DIFF=diff} +${DIFF} xg-sc-format-1.ok xg-sc-format-1.po +result=$? + +exit $result diff --git a/gettext-tools/tests/xgettext-scheme-6 b/gettext-tools/tests/xgettext-scheme-format-2 similarity index 55% rename from gettext-tools/tests/xgettext-scheme-6 rename to gettext-tools/tests/xgettext-scheme-format-2 index 6926acf5a..08bb2522e 100755 --- a/gettext-tools/tests/xgettext-scheme-6 +++ b/gettext-tools/tests/xgettext-scheme-format-2 @@ -3,22 +3,22 @@ # Test Scheme support: scheme-format string with a complex nested loop. -cat <<\EOF > xg-sc-6.scm +cat <<\EOF > xg-sc-format-2.scm (_ "A~0{B~0b~,v*C~:*D~,v*E~,v*F~0{G~0{H~}I~}J~^~}K") EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -k_ --omit-header --no-location -d xg-sc-6.tmp xg-sc-6.scm || Exit 1 -LC_ALL=C tr -d '\r' < xg-sc-6.tmp.po > xg-sc-6.po || Exit 1 +${XGETTEXT} -k_ --omit-header --no-location -d xg-sc-format-2.tmp xg-sc-format-2.scm || Exit 1 +LC_ALL=C tr -d '\r' < xg-sc-format-2.tmp.po > xg-sc-format-2.po || Exit 1 -cat <<\EOF > xg-sc-6.ok +cat <<\EOF > xg-sc-format-2.ok #, scheme-format msgid "A~0{B~0b~,v*C~:*D~,v*E~,v*F~0{G~0{H~}I~}J~^~}K" msgstr "" EOF : ${DIFF=diff} -${DIFF} xg-sc-6.ok xg-sc-6.po +${DIFF} xg-sc-format-2.ok xg-sc-format-2.po result=$? exit $result