]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Three new tests.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Jan 2003 15:11:53 +0000 (15:11 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:08:55 +0000 (12:08 +0200)
tests/ChangeLog
tests/Makefile.am
tests/msgcat-10 [new file with mode: 0755]
tests/msgcat-8 [new file with mode: 0755]
tests/msgcat-9 [new file with mode: 0755]

index e391edca524307d983789b454ff5fd2b129dd445..9c9f139183cd1be0c975e6c2685813beab122644 100644 (file)
@@ -1,3 +1,11 @@
+2001-11-10  Karl Eichwalder  <ke@gnu.franken.de>
+2003-01-12  Bruno Haible  <bruno@clisp.org>
+
+       * msgcat-8: New file.
+       * msgcat-9: New file.
+       * msgcat-10: New file.
+       * Makefile.am (TESTS): Add them.
+
 2002-12-04  Bruno Haible  <bruno@clisp.org>
 
        * msgmerge-22: New file, from Karl Eichwalder.
index be448403635bd9a80b00e4a373437c88f61f90f3..66adf4c9beb14398609323843433d8d72e27a532 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the check subdirectory of the GNU NLS Utilities
-## Copyright (C) 1995-1997, 2001-2002 Free Software Foundation, Inc.
+## Copyright (C) 1995-1997, 2001-2003 Free Software Foundation, Inc.
 ##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ TESTS = gettext-1 gettext-2 \
        msgattrib-6 msgattrib-7 msgattrib-8 msgattrib-9 msgattrib-10 \
        msgattrib-11 msgattrib-12 msgattrib-13 msgattrib-14 \
        msgcat-1 msgcat-2 msgcat-3 msgcat-4 msgcat-5 msgcat-6 msgcat-7 \
+       msgcat-8 msgcat-9 msgcat-10 \
        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-10 b/tests/msgcat-10
new file mode 100755 (executable)
index 0000000..ada0a56
--- /dev/null
@@ -0,0 +1,106 @@
+#! /bin/sh
+
+# Verify msgcat of two files, when the header entries have different comments
+# but the same contents. The resulting header entry is not marked fuzzy,
+# because the #-#-#-#-# are only in comments and do not necessarily require
+# translator attention; in other words, an msgstr which is valid in both input
+# files is also valid in the result.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mcat-test10.in1 mcat-test10.in2"
+cat <<\EOF > mcat-test10.in1
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+# Def Kab <dk@zzz.uucp>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid ""
+"Congratulations!"
+msgstr ""
+"Glückwunsch!"
+EOF
+
+cat <<\EOF > mcat-test10.in2
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid ""
+"Congratulations!"
+msgstr ""
+"Glückwunsch!"
+EOF
+
+tmpfiles="$tmpfiles mcat-test10.out"
+rm -f mcat-test10.out
+
+: ${MSGCAT=msgcat}
+${MSGCAT} --more-than=0 -o mcat-test10.out \
+    mcat-test10.in1 mcat-test10.in2
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mcat-test10.ok"
+cat <<\EOF > mcat-test10.ok
+# #-#-#-#-#  mcat-test10.in1 (xyz)  #-#-#-#-#
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+# Def Kab <dk@zzz.uucp>, 2001.
+#
+# #-#-#-#-#  mcat-test10.in2 (xyz)  #-#-#-#-#
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid "Congratulations!"
+msgstr "Glückwunsch!"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test10.ok mcat-test10.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/msgcat-8 b/tests/msgcat-8
new file mode 100755 (executable)
index 0000000..310bc15
--- /dev/null
@@ -0,0 +1,114 @@
+#! /bin/sh
+
+# Verify msgcat of two files, when the header entries have different comments
+# and different contents. The resulting header entry must be marked fuzzy.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mcat-test8.in1 mcat-test8.in2"
+cat <<\EOF > mcat-test8.in1
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+# Def Kab <dk@zzz.uucp>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid ""
+"Congratulations!"
+msgstr ""
+"Glückwunsch!"
+EOF
+
+cat <<\EOF > mcat-test8.in2
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
+"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid ""
+"Congratulations!"
+msgstr ""
+"Glückwunsch!"
+EOF
+
+tmpfiles="$tmpfiles mcat-test8.out"
+rm -f mcat-test8.out
+
+: ${MSGCAT=msgcat}
+${MSGCAT} --more-than=0 -o mcat-test8.out \
+    mcat-test8.in1 mcat-test8.in2
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mcat-test8.ok"
+cat <<\EOF > mcat-test8.ok
+# #-#-#-#-#  mcat-test8.in1 (xyz)  #-#-#-#-#
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+# Def Kab <dk@zzz.uucp>, 2001.
+#
+# #-#-#-#-#  mcat-test8.in2 (xyz)  #-#-#-#-#
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"#-#-#-#-#  mcat-test8.in1 (xyz)  #-#-#-#-#\n"
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"#-#-#-#-#  mcat-test8.in2 (xyz)  #-#-#-#-#\n"
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
+"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid "Congratulations!"
+msgstr "Glückwunsch!"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test8.ok mcat-test8.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/msgcat-9 b/tests/msgcat-9
new file mode 100755 (executable)
index 0000000..95e94a9
--- /dev/null
@@ -0,0 +1,106 @@
+#! /bin/sh
+
+# Verify msgcat of two files, when the header entries have the same comments
+# but different contents. The resulting header entry must be marked fuzzy.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mcat-test9.in1 mcat-test9.in2"
+cat <<\EOF > mcat-test9.in1
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid ""
+"Congratulations!"
+msgstr ""
+"Glückwunsch!"
+EOF
+
+cat <<\EOF > mcat-test9.in2
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
+"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid ""
+"Congratulations!"
+msgstr ""
+"Glückwunsch!"
+EOF
+
+tmpfiles="$tmpfiles mcat-test9.out"
+rm -f mcat-test9.out
+
+: ${MSGCAT=msgcat}
+${MSGCAT} --more-than=0 -o mcat-test9.out \
+    mcat-test9.in1 mcat-test9.in2
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mcat-test9.ok"
+cat <<\EOF > mcat-test9.ok
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"#-#-#-#-#  mcat-test9.in1 (xyz)  #-#-#-#-#\n"
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
+"PO-Revision-Date: 2001-11-11 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"#-#-#-#-#  mcat-test9.in2 (xyz)  #-#-#-#-#\n"
+"Project-Id-Version: xyz\n"
+"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
+"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
+"Last-Translator: Kab Def <ke@zzz.uucp>\n"
+"Language-Team: German <i18n@zzz.uucp>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid "Congratulations!"
+msgstr "Glückwunsch!"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test9.ok mcat-test9.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result