+2001-05-02 Bruno Haible <haible@clisp.cons.org>
+
+ * msgcomm-16: Change expected result.
+ * Makefile.am (TESTS): Add the new tests.
+
+2001-05-02 Karl Eichwalder <keichwa@gmx.net>
+
+ * msgmerge-6: New file.
+ * msgmerge-7: New file.
+ * msgmerge-8: New file.
+ * msgmerge-9: New file.
+ * msgcomm-1: New file.
+ * msgcomm-2: New file.
+ * msgcomm-3: New file.
+ * msgcomm-4: New file.
+ * msgcomm-5: New file.
+ * msgcomm-6: New file.
+ * msgcomm-7: New file.
+ * msgcomm-8: New file.
+ * msgcomm-9: New file.
+ * msgcomm-10: New file.
+ * msgcomm-11: New file.
+ * msgcomm-12: New file.
+ * msgcomm-13: New file.
+ * msgcomm-14: New file.
+ * msgcomm-15: New file.
+ * msgcomm-16: New file.
+
2001-04-28 Bruno Haible <haible@clisp.cons.org>
* xg-test1.ok.po: Regenerated.
--- /dev/null
+#! /bin/sh
+
+# Test --more-than=0 option.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test1.in1 mcomm-test1.in2"
+cat <<EOF > mcomm-test1.in1
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test1.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test1.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 -o mcomm-test1.out mcomm-test1.in1 mcomm-test1.in2
+
+tmpfiles="$tmpfiles mcomm-test1.ok"
+cat << EOF > mcomm-test1.ok
+#: first.c:123
+msgid "1"
+msgstr "1x"
+
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test1.ok mcomm-test1.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test merge of common entries with --more-than=1 and --omit-header.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test10.in1 mcomm-test10.in2"
+cat <<EOF > mcomm-test10.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test10.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test10.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=1 --no-location --omit-header -o mcomm-test10.out \
+ mcomm-test10.in1 mcomm-test10.in2
+
+tmpfiles="$tmpfiles mcomm-test10.ok"
+cat << EOF > mcomm-test10.ok
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test10.ok mcomm-test10.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test that --more-than=1 drops entries which occur only once.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test11.in1 mcomm-test11.in2"
+cat <<EOF > mcomm-test11.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+
+#: first.c:123
+msgid "2"
+msgstr "2x"
+EOF
+
+cat <<EOF > mcomm-test11.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test11.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=1 --no-location --omit-header -o mcomm-test11.out \
+ mcomm-test11.in1 mcomm-test11.in2
+
+tmpfiles="$tmpfiles mcomm-test11.ok"
+cat << EOF > mcomm-test11.ok
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test11.ok mcomm-test11.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test that --less-than=2 removes entries which occur twice and keeps entries
+# which occur only once.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# unique msg in in3
+
+tmpfiles="mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3"
+cat <<EOF > mcomm-test12.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: 8-bit\n"
+
+# duplicate (cf. in2)
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test12.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: 8-bit\n"
+
+# duplicate (cf. in1)
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+cat <<EOF > mcomm-test12.in3
+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: 8-bit\n"
+
+# unique
+#: hunt.c:890
+msgid "2"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test12.out"
+: ${MSGCOMM=msgcomm}
+
+# --unique is shorthand for --less-than=2; do we've to test both
+# switches? Are 'for' loops allowed? -ke-
+${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test12.out \
+ mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3
+
+tmpfiles="$tmpfiles mcomm-test12.ok"
+cat << EOF > mcomm-test12.ok
+# unique
+msgid "2"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test12.ok mcomm-test12.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test that --less-than=2 removes entries which occur more than twice.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# one msg occurs 3 times (has to go away).
+# An unique msg in in3 has to stay.
+
+tmpfiles="mcomm-test13.in1 mcomm-test13.in2 mcomm-test13.in3"
+cat <<EOF > mcomm-test13.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: 8-bit\n"
+
+# occurs 3 times
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test13.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+cat <<EOF > mcomm-test13.in3
+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: 8-bit\n"
+
+#: hunt.c:789
+msgid "1"
+msgstr ""
+
+# unique
+#: hunt.c:890
+msgid "2"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test13.out"
+: ${MSGCOMM=msgcomm}
+
+# --unique is shorthand for --less-than=2; do we've to test both
+# switches? Are 'for' loops allowed? -ke-
+${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test13.out \
+ mcomm-test13.in1 mcomm-test13.in2 mcomm-test13.in3
+
+tmpfiles="$tmpfiles mcomm-test13.ok"
+cat << EOF > mcomm-test13.ok
+# unique
+msgid "2"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test13.ok mcomm-test13.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --force-po option.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# no unique msg in input files.
+# without --force-po don't create any PO file; cf. msgcomm-15
+
+tmpfiles="mcomm-test14.in1 mcomm-test14.in2 mcomm-test14.in3"
+cat <<EOF > mcomm-test14.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: 8-bit\n"
+
+# occurs 3 times
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test14.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+cat <<EOF > mcomm-test14.in3
+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: 8-bit\n"
+
+#: hunt.c:789
+msgid "1"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test14.out"
+: ${MSGCOMM=msgcomm}
+
+# --unique is shorthand for --less-than=2; do we've to test both
+# switches? Are 'for' loops allowed? -ke-
+${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test14.out \
+ mcomm-test14.in1 mcomm-test14.in2 mcomm-test14.in3
+
+tmpfiles="$tmpfiles mcomm-test14.ok"
+cat << EOF > mcomm-test14.ok
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test14.ok mcomm-test14.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test that without --force-po option, a PO file without translations is
+# not created.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# no unique msg in input files.
+# with --force-po create an empty PO file; cf. msgcomm-14
+
+tmpfiles="mcomm-test15.in1 mcomm-test15.in2 mcomm-test15.in3"
+cat <<EOF > mcomm-test15.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: 8-bit\n"
+
+# occurs 3 times
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test15.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+cat <<EOF > mcomm-test15.in3
+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: 8-bit\n"
+
+#: hunt.c:789
+msgid "1"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test15.out"
+rm -f mcomm-test15.out
+
+: ${MSGCOMM=msgcomm}
+
+# --unique is shorthand for --less-than=2; do we've to test both
+# switches? Are 'for' loops allowed? -ke-
+${MSGCOMM} --less-than=2 --no-location -o mcomm-test15.out \
+ mcomm-test15.in1 mcomm-test15.in2 mcomm-test15.in3
+
+# we've no unique msg; thus no PO should be created.
+if test -e mcomm-test15.out; then
+ echo "mcomm-test15.out wrongly written."
+ result=1
+else
+ result=0
+fi
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# no unique msg in input files.
+# with --force-po create an empty PO file; cf. msgcomm-14
+
+tmpfiles="mcomm-test16.in1 mcomm-test16.in2"
+cat <<EOF > mcomm-test16.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 > mcomm-test16.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 mcomm-test16.out"
+rm -f mcomm-test16.out
+
+: ${MSGCOMM=msgcomm}
+
+${MSGCOMM} --more-than=0 -o mcomm-test16.out \
+ mcomm-test16.in1 mcomm-test16.in2
+
+tmpfiles="$tmpfiles mcomm-test16.ok"
+cat << EOF > mcomm-test16.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
+msgid "You can log in as \"%1\"."
+msgstr "Sie können sich als \"%1\" einloggen."
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test16.ok mcomm-test16.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --no-location option.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test2.in1 mcomm-test2.in2"
+cat <<EOF > mcomm-test2.in1
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test2.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test2.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 --no-location -o mcomm-test2.out \
+ mcomm-test2.in1 mcomm-test2.in2
+
+tmpfiles="$tmpfiles mcomm-test2.ok"
+cat << EOF > mcomm-test2.ok
+msgid "1"
+msgstr "1x"
+
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test2.ok mcomm-test2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --omit-header option when there is no header.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test3.in1 mcomm-test3.in2"
+cat <<EOF > mcomm-test3.in1
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test3.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test3.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 --omit-header -o mcomm-test3.out \
+ mcomm-test3.in1 mcomm-test3.in2
+
+tmpfiles="$tmpfiles mcomm-test3.ok"
+cat << EOF > mcomm-test3.ok
+#: first.c:123
+msgid "1"
+msgstr "1x"
+
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test3.ok mcomm-test3.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test what happens with the header entry.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test4.in1 mcomm-test4.in2"
+cat <<EOF > mcomm-test4.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test4.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test4.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 -o mcomm-test4.out \
+ mcomm-test4.in1 mcomm-test4.in2
+
+tmpfiles="$tmpfiles mcomm-test4.ok"
+cat << EOF > mcomm-test4.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test4.ok mcomm-test4.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --omit-header option when there is a header.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test5.in1 mcomm-test5.in2"
+cat <<EOF > mcomm-test5.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test5.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test5.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 --omit-header -o mcomm-test5.out \
+ mcomm-test5.in1 mcomm-test5.in2
+
+tmpfiles="$tmpfiles mcomm-test5.ok"
+cat << EOF > mcomm-test5.ok
+#: first.c:123
+msgid "1"
+msgstr "1x"
+
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test5.ok mcomm-test5.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --no-location option when there is a header.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test6.in1 mcomm-test6.in2"
+cat <<EOF > mcomm-test6.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test6.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test6.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 --no-location -o mcomm-test6.out \
+ mcomm-test6.in1 mcomm-test6.in2
+
+tmpfiles="$tmpfiles mcomm-test6.ok"
+cat << EOF > mcomm-test6.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: 8-bit\n"
+
+msgid "1"
+msgstr "1x"
+
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test6.ok mcomm-test6.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --no-location and --omit-header options together.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test7.in1 mcomm-test7.in2"
+cat <<EOF > mcomm-test7.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test7.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test7.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 --no-location --omit-header -o mcomm-test7.out \
+ mcomm-test7.in1 mcomm-test7.in2
+
+tmpfiles="$tmpfiles mcomm-test7.ok"
+cat << EOF > mcomm-test7.ok
+msgid "1"
+msgstr "1x"
+
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test7.ok mcomm-test7.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test merge of common entries with --more-than=1.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test8.in1 mcomm-test8.in2"
+cat <<EOF > mcomm-test8.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test8.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test8.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=1 -o mcomm-test8.out \
+ mcomm-test8.in1 mcomm-test8.in2
+
+tmpfiles="$tmpfiles mcomm-test8.ok"
+cat << EOF > mcomm-test8.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: 8-bit\n"
+
+#: first.c:123 hunt.c:759
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test8.ok mcomm-test8.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test merge of common entries with --more-than=1 and --no-location.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test9.in1 mcomm-test9.in2"
+cat <<EOF > mcomm-test9.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: 8-bit\n"
+
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test9.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: 8-bit\n"
+
+#: hunt.c:759
+msgid "1"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mcomm-test9.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=1 --no-location -o mcomm-test9.out \
+ mcomm-test9.in1 mcomm-test9.in2
+
+tmpfiles="$tmpfiles mcomm-test9.ok"
+cat << EOF > mcomm-test9.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: 8-bit\n"
+
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test9.ok mcomm-test9.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test compendium option.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test6.in1 mm-test6.com mm-test6.pot"
+cat <<EOF > mm-test6.in1
+#: file.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mm-test6.com
+#: file.c:345
+msgid "2"
+msgstr "2x"
+EOF
+
+cat <<EOF > mm-test6.pot
+#: file.c:123
+msgid "1"
+msgstr ""
+
+#: file.c:345
+msgid "2"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test6.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q -C mm-test6.com mm-test6.in1 mm-test6.pot -o mm-test6.out
+
+tmpfiles="$tmpfiles mm-test6.ok"
+cat << EOF > mm-test6.ok
+#: file.c:123
+msgid "1"
+msgstr "1x"
+
+#: file.c:345
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test6.ok mm-test6.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test compendium option with fuzziness.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test7.in1 mm-test7.com mm-test7.pot"
+cat <<EOF > mm-test7.in1
+#: file.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mm-test7.com
+#: file.c:345
+msgid "one, two, three"
+msgstr "1, 2, 3"
+EOF
+
+cat <<EOF > mm-test7.pot
+#: file.c:123
+msgid "1"
+msgstr ""
+
+#: file.c:345
+msgid "one, two, three..."
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test7.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q -C mm-test7.com mm-test7.in1 mm-test7.pot -o mm-test7.out
+
+tmpfiles="$tmpfiles mm-test7.ok"
+cat << EOF > mm-test7.ok
+#: file.c:123
+msgid "1"
+msgstr "1x"
+
+#: file.c:345
+#, fuzzy
+msgid "one, two, three..."
+msgstr "1, 2, 3"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test7.ok mm-test7.out
+result=$?
+
+# rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test compendium option.
+
+# Translation is available within the compendium (mm-test8.com)
+# the old translation file (mm-test8.in1) contains the same msgid
+# Why not make use of the translation from the compendium?
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test8.in1 mm-test8.com mm-test8.pot"
+cat <<EOF > mm-test8.in1
+#: file.c:123
+msgid "1"
+msgstr "1x"
+
+#: file.c:345
+msgid "one, two, three"
+msgstr ""
+EOF
+
+cat <<EOF > mm-test8.com
+#: file.c:345
+msgid "one, two, three"
+msgstr "1, 2, 3"
+EOF
+
+cat <<EOF > mm-test8.pot
+#: file.c:123
+msgid "1"
+msgstr ""
+
+#: file.c:345
+msgid "one, two, three"
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test8.out"
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} -q -C mm-test8.com mm-test8.in1 mm-test8.pot -o mm-test8.out
+
+tmpfiles="$tmpfiles mm-test8.ok"
+cat << EOF > mm-test8.ok
+#: file.c:123
+msgid "1"
+msgstr "1x"
+
+#: file.c:345
+msgid "one, two, three"
+msgstr "1, 2, 3"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test8.ok mm-test8.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test non-ASCII character at the end of msgstr. (Triggered a glibc-2.1 bug.)
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mm-test9.in1.po mm-test9.in2.po"
+cat <<EOF > mm-test9.in1.po
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cog_training 1.0\n"
+"POT-Creation-Date: 2001-04-29 22:40+0200\n"
+"PO-Revision-Date: 2001-04-29 21:19+02:00\n"
+"Last-Translator: Felix Natter <fnatter@gmx.net>\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"
+
+#: cogarithmetic.cc:12 cogidmarkup.cc:288 cogroman.cc:14
+msgid "white"
+msgstr "weiß"
+EOF
+
+cat <<EOF > mm-test9.in2.po
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2001-04-30 18:51+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: cogarithmetic.cc:12 cogidmarkup.cc:288 cogroman.cc:14
+msgid "white"
+msgstr ""
+
+#: cogarithmetic.cc:13 cogroman.cc:109 cogroman.cc:114
+msgid "false."
+msgstr ""
+
+#: cogarithmetic.cc:14
+msgid "was correct."
+msgstr ""
+EOF
+
+tmpfiles="$tmpfiles mm-test9.out"
+: ${MSGMERGE=msgmerge}
+LC_MESSAGES=C LC_ALL= \
+${MSGMERGE} -q mm-test9.in1.po mm-test9.in2.po -o mm-test9.out
+
+tmpfiles="$tmpfiles mm-test9.ok"
+cat <<EOF > mm-test9.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cog_training 1.0\n"
+"POT-Creation-Date: 2001-04-30 18:51+0200\n"
+"PO-Revision-Date: 2001-04-29 21:19+02:00\n"
+"Last-Translator: Felix Natter <fnatter@gmx.net>\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"
+
+#: cogarithmetic.cc:12 cogidmarkup.cc:288 cogroman.cc:14
+msgid "white"
+msgstr "weiß"
+
+#: cogarithmetic.cc:13 cogroman.cc:109 cogroman.cc:114
+msgid "false."
+msgstr ""
+
+#: cogarithmetic.cc:14
+msgid "was correct."
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test9.ok mm-test9.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result