blob: 6b7f6f3b3fc6df9134e7a0a04a30e8ed39bcfe18 [file] [log] [blame]
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test handling of input files with different charsets.
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
rm -f mcomm-test16.tmp
: ${MSGCOMM=msgcomm}
LC_MESSAGES=C LC_ALL= \
${MSGCOMM} --more-than=0 -o mcomm-test16.tmp \
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 || { Exit 1; }
LC_ALL=C tr -d '\r' < mcomm-test16.tmp > mcomm-test16.out || Exit 1
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
#, ycp-format
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=$?
exit $result