#! /bin/sh
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles mcomm-test16.in1 mcomm-test16.in2"
cat <<\EOF > mcomm-test16.in1
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"
msgid ""
"Congratulations!"
msgstr ""
"Glückwunsch!"
EOF
cat <<\EOF > mcomm-test16.in2
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"
msgid "You can log in as \"%1\"."
msgstr "Sie können sich als \"%1\" einloggen."
EOF
tmpfiles="$tmpfiles mcomm-test16.out mcomm-test16.err"
rm -f mcomm-test16.out
: ${MSGCOMM=msgcomm}
LC_MESSAGES=C LC_ALL= \
${MSGCOMM} --more-than=0 -o mcomm-test16.out \
mcomm-test16.in1 mcomm-test16.in2 >mcomm-test16.err 2>&1
result=$?
cat mcomm-test16.err | grep -v 'warning: .* encodings' | grep -v '^ '
test $result = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles mcomm-test16.ok"
cat << \EOF > mcomm-test16.ok
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"
msgid "Congratulations!"
msgstr "Glückwunsch!"
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