summaryrefslogtreecommitdiffstats
path: root/tests/msgfmt-2
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-08-31 18:38:34 +0000
committerBruno Haible <bruno@clisp.org>2001-08-31 18:38:34 +0000
commitb7f1c0c38648b452c17a69ed23227a2a7e6841ba (patch)
tree3bbe97ab64aeecbeb9c6b3b82463bd652f5aeae1 /tests/msgfmt-2
parent13a5f26924f5a2f399c406340d1395813c38e147 (diff)
downloadexternal_gettext-b7f1c0c38648b452c17a69ed23227a2a7e6841ba.zip
external_gettext-b7f1c0c38648b452c17a69ed23227a2a7e6841ba.tar.gz
external_gettext-b7f1c0c38648b452c17a69ed23227a2a7e6841ba.tar.bz2
Reorganize msgfmt checking options.
Diffstat (limited to 'tests/msgfmt-2')
-rwxr-xr-xtests/msgfmt-213
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/msgfmt-2 b/tests/msgfmt-2
index 5c90eb0..5b385bb 100755
--- a/tests/msgfmt-2
+++ b/tests/msgfmt-2
@@ -52,7 +52,7 @@ msgstr "mesg 4 translation"
#
domain "error_dom"
msgid "error 3"
-msgstr "alternate error 2 translation"
+msgstr "alternate error 3 translation"
msgid "error 5"
msgstr "error 5 translation"
#
@@ -61,8 +61,17 @@ msgid "window 6"
msgstr "window 6 translation"
EOF
+# Without use of msgcat, expect a "duplicate message definition" error.
: ${MSGFMT=msgfmt}
-${MSGFMT} module1.po module2.po -o LC_MESSAGES/gen.mo
+if ${MSGFMT} module1.po module2.po -o LC_MESSAGES/gen.mo 2> /dev/null; then
+ exit 1
+fi
+
+# With msgcat, it should work.
+tmpfiles="$tmpfiles modules.po"
+: ${MSGCAT=msgcat} ${MSGFMT=msgfmt}
+${MSGCAT} --use-first module1.po module2.po -o modules.po
+${MSGFMT} modules.po -o LC_MESSAGES/gen.mo
tmpfiles="$tmpfiles mf-test2.out"
: ${GETTEXT=gettext}