From: Bruno Haible Date: Thu, 5 Oct 2006 11:18:23 +0000 (+0000) Subject: Test msgcat on a PO files with previous msgids. X-Git-Tag: 0.16.x-branchpoint~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f146ecd0820a764d71bb7cf6f2f26241922fc8a;p=thirdparty%2Fgettext.git Test msgcat on a PO files with previous msgids. --- diff --git a/gettext-tools/tests/msgcat-16 b/gettext-tools/tests/msgcat-16 new file mode 100755 index 000000000..16f937de7 --- /dev/null +++ b/gettext-tools/tests/msgcat-16 @@ -0,0 +1,87 @@ +#! /bin/sh + +# Test msgcat on a PO files with previous msgids. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles mcat-test16.in1" +cat <<\EOF > mcat-test16.in1 +msgid "" +msgstr "" +"Report-Msgid-Bugs-To: \n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. TRANSLATORS: An error message. +#: src/args.c:242 +#, fuzzy, c-format +#| msgid "too many arguments" +msgid "too large arguments" +msgstr "zu viele Argumente" + +# Oder besser "fehlende Argumente"? +#. TRANSLATORS: An error message. +#: src/args.c:273 +#, c-format +#| msgid "missing arguments" +msgid "Missing arguments." +msgstr "Argumente fehlen." +EOF + +tmpfiles="$tmpfiles mcat-test16.in2" +cat <<\EOF > mcat-test16.in2 +msgid "" +msgstr "" +"Report-Msgid-Bugs-To: \n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. TRANSLATORS: An error message. +#: src/args.c:242 +#, fuzzy, c-format +#| msgid "too few arguments" +msgid "too large arguments" +msgstr "zu wenige Argumente" +EOF + +tmpfiles="$tmpfiles mcat-test16.out" +rm -f mcat-test16.out +: ${MSGCAT=msgcat} +${MSGCAT} -o mcat-test16.out mcat-test16.in1 mcat-test16.in2 +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mcat-test16.ok" +cat <<\EOF > mcat-test16.ok +msgid "" +msgstr "" +"Report-Msgid-Bugs-To: \n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. TRANSLATORS: An error message. +#: src/args.c:242 +#, fuzzy, c-format +msgid "too large arguments" +msgstr "" +"#-#-#-#-# mcat-test16.in1 #-#-#-#-#\n" +"zu viele Argumente\n" +"#-#-#-#-# mcat-test16.in2 #-#-#-#-#\n" +"zu wenige Argumente" + +# Oder besser "fehlende Argumente"? +#. TRANSLATORS: An error message. +#: src/args.c:273 +#, c-format +#| msgid "missing arguments" +msgid "Missing arguments." +msgstr "Argumente fehlen." +EOF + +: ${DIFF=diff} +${DIFF} mcat-test16.ok mcat-test16.out +result=$? + +rm -fr $tmpfiles + +exit $result