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