From: Bruno Haible Date: Sun, 29 Jul 2001 14:50:41 +0000 (+0000) Subject: First msgcat test. X-Git-Tag: v0.11~587 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38a94c7de6e42d6c10c014938777979a043fc137;p=thirdparty%2Fgettext.git First msgcat test. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 14c425fb5..954dd024e 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2001-07-29 Bruno Haible + + * msgcat-1: New file, from Karl Eichwalder with modifications. + * Makefile.am (TESTS): Add it. + 2001-07-05 Bruno Haible * msgmerge-7: rm $tmpfiles. diff --git a/tests/Makefile.am b/tests/Makefile.am index 28ad2829a..2735011c2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,6 +20,7 @@ AUTOMAKE_OPTIONS = 1.2 gnits TESTS = gettext-1 gettext-2 \ + msgcat-1 \ msgcmp-1 msgcmp-2 \ msgcomm-1 msgcomm-2 msgcomm-3 msgcomm-4 msgcomm-5 msgcomm-6 msgcomm-7 \ msgcomm-8 msgcomm-9 msgcomm-10 msgcomm-11 msgcomm-12 msgcomm-13 \ diff --git a/tests/msgcat-1 b/tests/msgcat-1 new file mode 100755 index 000000000..11a3f9481 --- /dev/null +++ b/tests/msgcat-1 @@ -0,0 +1,73 @@ +#! /bin/sh + +# Verify that msgcat doesn't introduce alternative syntax if all translations +# have the same msgstr. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="mcat-test1.in1 mcat-test1.in2" +cat < mcat-test1.in1 +msgid "" +msgstr "" +"Project-Id-Version: GNU one 1.2.3\n" +"POT-Creation-Date: 2000-12-11 20:49+0100\n" +"PO-Revision-Date: 2000-03-18 15:25+01:00\n" +"Last-Translator: Karl Eichwalder \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: first.c:123 +msgid "1" +msgstr "eins" +EOF + +cat < mcat-test1.in2 +msgid "" +msgstr "" +"Project-Id-Version: GNU one 1.2.3\n" +"POT-Creation-Date: 2000-12-11 20:49+0100\n" +"PO-Revision-Date: 2000-03-18 15:25+01:00\n" +"Last-Translator: Karl Eichwalder \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: hunt.c:759 +msgid "1" +msgstr "eins" +EOF + +tmpfiles="$tmpfiles mcat-test1.out" +: ${MSGCAT=msgcat} + +${MSGCAT} mcat-test1.in1 mcat-test1.in2 -o mcat-test1.out + +tmpfiles="$tmpfiles mcat-test1.ok" +cat << EOF > mcat-test1.ok +msgid "" +msgstr "" +"Project-Id-Version: GNU one 1.2.3\n" +"POT-Creation-Date: 2000-12-11 20:49+0100\n" +"PO-Revision-Date: 2000-03-18 15:25+01:00\n" +"Last-Translator: Karl Eichwalder \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: first.c:123 hunt.c:759 +msgid "1" +msgstr "eins" +EOF + +: ${DIFF=diff} +${DIFF} mcat-test1.ok mcat-test1.out +result=$? + +rm -fr $tmpfiles + +exit $result