]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Test msgcat on a PO files with previous msgids.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Oct 2006 11:18:23 +0000 (11:18 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:04 +0000 (12:14 +0200)
gettext-tools/tests/msgcat-16 [new file with mode: 0755]

diff --git a/gettext-tools/tests/msgcat-16 b/gettext-tools/tests/msgcat-16
new file mode 100755 (executable)
index 0000000..16f937d
--- /dev/null
@@ -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