1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test handling of input files with different charsets.
5
6cat <<\EOF > mcomm-test16.in1
7# German message file for xyz.
8# Copyright (C) 1999, 2000, 2001 xyz.
9# Kab Def <ke@zzz.uucp>, 2000.
10#
11msgid ""
12msgstr ""
13"Project-Id-Version: xyz\n"
14"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
15"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
16"Last-Translator: Kab Def <ke@zzz.uucp>\n"
17"Language-Team: German <i18n@zzz.uucp>\n"
18"MIME-Version: 1.0\n"
19"Content-Type: text/plain; charset=ISO-8859-1\n"
20"Content-Transfer-Encoding: 8bit\n"
21
22#. Help text (HTML-like) START
23#: clients/inst_ask_config.ycp:119
24msgid ""
25"Congratulations!"
26msgstr ""
27"Gl�ckwunsch!"
28EOF
29
30cat <<\EOF > mcomm-test16.in2
31# German message file for xyz.
32# Copyright (C) 1999, 2000, 2001 xyz.
33# Kab Def <ke@zzz.uucp>, 2000.
34#
35msgid ""
36msgstr ""
37"Project-Id-Version: xyz\n"
38"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
39"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
40"Last-Translator: Kab Def <ke@zzz.uucp>\n"
41"Language-Team: German <i18n@zzz.uucp>\n"
42"MIME-Version: 1.0\n"
43"Content-Type: text/plain; charset=UTF-8\n"
44"Content-Transfer-Encoding: 8bit\n"
45
46#. Remind user of the login name he chose
47#: clients/inst_ask_config.ycp:72
48#, ycp-format
49msgid "You can log in as \"%1\"."
50msgstr "Sie können sich als \"%1\" einloggen."
51EOF
52
53rm -f mcomm-test16.tmp
54
55: ${MSGCOMM=msgcomm}
56LC_MESSAGES=C LC_ALL= \
57${MSGCOMM} --more-than=0 -o mcomm-test16.tmp \
58    mcomm-test16.in1 mcomm-test16.in2 >mcomm-test16.err 2>&1
59result=$?
60cat mcomm-test16.err | grep -v 'warning: .* encodings' | grep -v '^ '
61test $result = 0 || { Exit 1; }
62LC_ALL=C tr -d '\r' < mcomm-test16.tmp > mcomm-test16.out || Exit 1
63
64cat << \EOF > mcomm-test16.ok
65# German message file for xyz.
66# Copyright (C) 1999, 2000, 2001 xyz.
67# Kab Def <ke@zzz.uucp>, 2000.
68#
69msgid ""
70msgstr ""
71"Project-Id-Version: xyz\n"
72"POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
73"PO-Revision-Date: 2001-04-24 13:02+02:00\n"
74"Last-Translator: Kab Def <ke@zzz.uucp>\n"
75"Language-Team: German <i18n@zzz.uucp>\n"
76"MIME-Version: 1.0\n"
77"Content-Type: text/plain; charset=UTF-8\n"
78"Content-Transfer-Encoding: 8bit\n"
79
80#. Help text (HTML-like) START
81#: clients/inst_ask_config.ycp:119
82msgid "Congratulations!"
83msgstr "Glückwunsch!"
84
85#. Remind user of the login name he chose
86#: clients/inst_ask_config.ycp:72
87#, ycp-format
88msgid "You can log in as \"%1\"."
89msgstr "Sie können sich als \"%1\" einloggen."
90EOF
91
92: ${DIFF=diff}
93${DIFF} mcomm-test16.ok mcomm-test16.out
94result=$?
95
96exit $result
97