diff options
author | Bruno Haible <bruno@clisp.org> | 2001-07-29 14:50:41 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-07-29 14:50:41 +0000 |
commit | 38a94c7de6e42d6c10c014938777979a043fc137 (patch) | |
tree | d9ec2abeb189bdaefce07d7991ea99f6b3d27797 | |
parent | d04550dbd48ca5a948ca2beb29f8cc56b2e8c94a (diff) | |
download | external_gettext-38a94c7de6e42d6c10c014938777979a043fc137.zip external_gettext-38a94c7de6e42d6c10c014938777979a043fc137.tar.gz external_gettext-38a94c7de6e42d6c10c014938777979a043fc137.tar.bz2 |
First msgcat test.
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rwxr-xr-x | tests/msgcat-1 | 73 |
3 files changed, 79 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 14c425f..954dd02 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2001-07-29 Bruno Haible <haible@clisp.cons.org> + + * msgcat-1: New file, from Karl Eichwalder with modifications. + * Makefile.am (TESTS): Add it. + 2001-07-05 Bruno Haible <haible@clisp.cons.org> * msgmerge-7: rm $tmpfiles. diff --git a/tests/Makefile.am b/tests/Makefile.am index 28ad282..2735011 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 0000000..11a3f94 --- /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 <<EOF > 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 <ke@suse.de>\n" +"Language-Team: German <de@li.org>\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 <<EOF > 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 <ke@suse.de>\n" +"Language-Team: German <de@li.org>\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 <ke@suse.de>\n" +"Language-Team: German <de@li.org>\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 |