]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Extra tests from Karl Eichwalder.
authorBruno Haible <bruno@clisp.org>
Wed, 31 Oct 2001 19:01:32 +0000 (19:01 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 20:45:19 +0000 (22:45 +0200)
tests/ChangeLog
tests/Makefile.am
tests/msgcat-2 [new file with mode: 0755]
tests/msgcat-3 [new file with mode: 0755]
tests/msgcat-4 [new file with mode: 0755]
tests/msgcat-5 [new file with mode: 0755]
tests/msgcat-6 [new file with mode: 0755]

index 07096e644e040d2b6329bf497c3cc6a6e3af198e..3e6ccb195828d969d09195779894e9595129ad48 100644 (file)
@@ -1,3 +1,16 @@
+2001-10-31  Bruno Haible  <haible@clisp.cons.org>
+
+       * Makefile.am (TESTS): Add msgcat-2, msgcat-3, msgcat-4, msgcat-5,
+       msgcat-6.
+
+2001-07-31  Karl Eichwalder  <keichwa@gmx.net>
+
+       * msgcat-2: New file.
+       * msgcat-3: New file.
+       * msgcat-4: New file.
+       * msgcat-5: New file.
+       * msgcat-6: New file.
+
 2001-10-31  Bruno Haible  <haible@clisp.cons.org>
 
        * xgettext-13: Hide warning.
index e28db07bd3386fde68a13ea1b9dc997a80ea0493..27abbabf348fb948757beb057fba3362521d301b 100644 (file)
@@ -20,7 +20,7 @@
 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
 
 TESTS = gettext-1 gettext-2 \
-       msgcat-1 \
+       msgcat-1 msgcat-2 msgcat-3 msgcat-4 msgcat-5 msgcat-6 \
        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-2 b/tests/msgcat-2
new file mode 100755 (executable)
index 0000000..7b21574
--- /dev/null
@@ -0,0 +1,100 @@
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# input files with different charsets.
+
+tmpfiles="mcat-test2.in1 mcat-test2.in2"
+cat <<EOF > mcat-test2.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-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
+
+cat <<EOF > mcat-test2.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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Remind user of the login name he chose
+#: clients/inst_ask_config.ycp:72
+#, ycp-format
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+EOF
+
+tmpfiles="$tmpfiles mcat-test2.out"
+rm -f mcat-test2.out
+
+: ${MSGCAT=msgcat}
+LC_MESSAGES=C LC_ALL= \
+${MSGCAT} --more-than=0 -o mcat-test2.out \
+    mcat-test2.in1 mcat-test2.in2 2>&1 \
+  | grep -v 'warning: .* encodings' | grep -v '^ '
+
+tmpfiles="$tmpfiles mcat-test2.ok"
+cat << EOF > mcat-test2.ok
+# 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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid "Congratulations!"
+msgstr "Glückwunsch!"
+
+#. Remind user of the login name he chose
+#: clients/inst_ask_config.ycp:72
+#, ycp-format
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test2.ok mcat-test2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/msgcat-3 b/tests/msgcat-3
new file mode 100755 (executable)
index 0000000..33dbd8b
--- /dev/null
@@ -0,0 +1,101 @@
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# input files with different charsets.
+# 1. ISO-8859-1, 2. UTF-8; plus --use-first
+
+tmpfiles="mcat-test3.in1 mcat-test3.in2"
+cat <<EOF > mcat-test3.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-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
+
+cat <<EOF > mcat-test3.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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Remind user of the login name he chose
+#: clients/inst_ask_config.ycp:72
+#, ycp-format
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+EOF
+
+tmpfiles="$tmpfiles mcat-test3.out"
+rm -f mcat-test3.out
+
+: ${MSGCAT=msgcat}
+LC_MESSAGES=C LC_ALL= \
+${MSGCAT} --use-first --more-than=0 -o mcat-test3.out \
+    mcat-test3.in1 mcat-test3.in2 2>&1 \
+  | grep -v 'warning: .* encodings' | grep -v '^ '
+
+tmpfiles="$tmpfiles mcat-test3.ok"
+cat << EOF > mcat-test3.ok
+# 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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid "Congratulations!"
+msgstr "Glückwunsch!"
+
+#. Remind user of the login name he chose
+#: clients/inst_ask_config.ycp:72
+#, ycp-format
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test3.ok mcat-test3.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/msgcat-4 b/tests/msgcat-4
new file mode 100755 (executable)
index 0000000..697eee4
--- /dev/null
@@ -0,0 +1,100 @@
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# input files with different charsets:
+# 1. UTF-8, 2. ISO-8859-1; plus --use-first
+
+tmpfiles="mcat-test4.in1 mcat-test4.in2"
+cat <<EOF > mcat-test4.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-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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Remind user of the login name he chose
+#: clients/inst_ask_config.ycp:72
+#, ycp-format
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+EOF
+
+cat <<EOF > mcat-test4.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-test4.out"
+rm -f mcat-test4.out
+
+: ${MSGCAT=msgcat}
+LC_MESSAGES=C LC_ALL= \
+${MSGCAT} --use-first --more-than=0 -o mcat-test4.out \
+    mcat-test4.in1 mcat-test4.in2 2>&1 \
+  | grep -v 'warning: .* encodings' | grep -v '^ '
+
+tmpfiles="$tmpfiles mcat-test4.ok"
+cat << EOF > mcat-test4.ok
+# 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=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Remind user of the login name he chose
+#: clients/inst_ask_config.ycp:72
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+msgid "Congratulations!"
+msgstr "Glückwunsch!"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test4.ok mcat-test4.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/msgcat-5 b/tests/msgcat-5
new file mode 100755 (executable)
index 0000000..1b93561
--- /dev/null
@@ -0,0 +1,94 @@
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# input files with different translations:
+# try --use-first
+
+tmpfiles="mcat-test5.in1 mcat-test5.in2"
+cat <<EOF > mcat-test5.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-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
+
+cat <<EOF > mcat-test5.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 ""
+"Herzlichen Glückwunsch!"
+EOF
+
+tmpfiles="$tmpfiles mcat-test5.out"
+rm -f mcat-test5.out
+
+: ${MSGCAT=msgcat}
+${MSGCAT} --use-first --more-than=0 -o mcat-test5.out \
+    mcat-test5.in1 mcat-test5.in2
+
+tmpfiles="$tmpfiles mcat-test5.ok"
+cat << EOF > mcat-test5.ok
+# 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
+
+: ${DIFF=diff}
+${DIFF} mcat-test5.ok mcat-test5.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/msgcat-6 b/tests/msgcat-6
new file mode 100755 (executable)
index 0000000..439cca0
--- /dev/null
@@ -0,0 +1,108 @@
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# input files with different translations:
+# preserve all variants, add markers
+
+tmpfiles="mcat-test6.in1 mcat-test6.in2"
+cat <<EOF > mcat-test6.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-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
+
+cat <<EOF > mcat-test6.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 ""
+"Herzlichen Glückwunsch!"
+EOF
+
+tmpfiles="$tmpfiles mcat-test6.out"
+rm -f mcat-test6.out
+
+: ${MSGCAT=msgcat}
+${MSGCAT} --more-than=0 -o mcat-test6.out \
+    mcat-test6.in1 mcat-test6.in2
+
+tmpfiles="$tmpfiles mcat-test6.ok"
+cat << EOF > mcat-test6.ok
+# #-#-#-#-#  mcat-test6.in1 (xyz)  #-#-#-#-#
+# German message file for xyz.
+# Copyright (C) 1999, 2000, 2001 xyz.
+# Kab Def <ke@zzz.uucp>, 2000.
+#
+# #-#-#-#-#  mcat-test6.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-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"
+
+#. #-#-#-#-#  mcat-test6.in1 (xyz)  #-#-#-#-#
+#. Help text (HTML-like) START
+#. #-#-#-#-#  mcat-test6.in2 (xyz)  #-#-#-#-#
+#. Help text (HTML-like) START
+#: clients/inst_ask_config.ycp:119
+#, fuzzy
+msgid "Congratulations!"
+msgstr ""
+"#-#-#-#-#  mcat-test6.in1 (xyz)  #-#-#-#-#\n"
+"Glückwunsch!\n"
+"#-#-#-#-#  mcat-test6.in2 (xyz)  #-#-#-#-#\n"
+"Herzlichen Glückwunsch!"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcat-test6.ok mcat-test6.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result