summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-02-14 15:39:59 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:09:50 +0200
commit6af443be290d5fad7c35fe6722bd9f481a28dad6 (patch)
treec8c2ad3a6d96f4ce5e4596b62746aca7588c9766 /gettext-tools/tests
parent65e5de5d8a402c6bbad0d595807d402eb45aa13c (diff)
downloadexternal_gettext-6af443be290d5fad7c35fe6722bd9f481a28dad6.zip
external_gettext-6af443be290d5fad7c35fe6722bd9f481a28dad6.tar.gz
external_gettext-6af443be290d5fad7c35fe6722bd9f481a28dad6.tar.bz2
Move tests/msgfmt-7 to gettext-tools/tests/msgfmt-7.
Diffstat (limited to 'gettext-tools/tests')
-rwxr-xr-xgettext-tools/tests/msgfmt-748
1 files changed, 48 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgfmt-7 b/gettext-tools/tests/msgfmt-7
new file mode 100755
index 0000000..002cf6d
--- /dev/null
+++ b/gettext-tools/tests/msgfmt-7
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+# Check for duplicates with identical translations
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mf-test7.in1"
+cat <<EOF > mf-test7.in1
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: msgfmt test 7\n"
+"PO-Revision-Date: 1996-04-05 19:47+0200\n"
+"Last-Translator: ABC DEF <abc@gnu.uucp>\n"
+"Language-Team: test <test@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+#
+msgid "2" msgstr "2"
+msgid "3" msgstr "3"
+msgid "3" msgstr "3"
+EOF
+
+tmpfiles="$tmpfiles mf-test7.err"
+: ${MSGFMT=msgfmt}
+LC_MESSAGES=C LC_ALL= \
+${MSGFMT} --verbose --check mf-test7.in1 -o /dev/null \
+ 2>&1 | grep -v '^==' > mf-test7.err
+
+tmpfiles="$tmpfiles mf-test7.ok"
+cat << EOF > mf-test7.ok
+mf-test7.in1:17: duplicate message definition
+mf-test7.in1:16: ...this is the location of the first definition
+msgfmt: found 1 fatal error
+EOF
+
+: ${DIFF=diff}
+${DIFF} mf-test7.ok mf-test7.err
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result