]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
First msgcat test.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Jul 2001 14:50:41 +0000 (14:50 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Jul 2001 14:50:41 +0000 (14:50 +0000)
tests/ChangeLog
tests/Makefile.am
tests/msgcat-1 [new file with mode: 0755]

index 14c425fb541177afe8c44dddddaea04b65da1e39..954dd024e738074121899fe9068a76467ac90f12 100644 (file)
@@ -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.
index 28ad2829a927b4a8ff5c64dbbda20fbe3e79e9fd..2735011c20204b95fd9c9b9eacfbaae1897ef28e 100644 (file)
@@ -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 (executable)
index 0000000..11a3f94
--- /dev/null
@@ -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