NetBSD/gnu/dist/gettext/gettext-tools/tests/msgcat-8

115 lines
2.9 KiB
Bash

#! /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