No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcomm-16
blob3457e5303113a439119642b149eba77bba1b3731
1 #! /bin/sh
3 # Test handling of input files with different charsets.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mcomm-test16.in1 mcomm-test16.in2"
9 cat <<\EOF > mcomm-test16.in1
10 # German message file for xyz.
11 # Copyright (C) 1999, 2000, 2001 xyz.
12 # Kab Def <ke@zzz.uucp>, 2000.
14 msgid ""
15 msgstr ""
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"
25 #. Help text (HTML-like) START
26 #: clients/inst_ask_config.ycp:119
27 msgid ""
28 "Congratulations!"
29 msgstr ""
30 "Glückwunsch!"
31 EOF
33 cat <<\EOF > mcomm-test16.in2
34 # German message file for xyz.
35 # Copyright (C) 1999, 2000, 2001 xyz.
36 # Kab Def <ke@zzz.uucp>, 2000.
38 msgid ""
39 msgstr ""
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"
49 #. Remind user of the login name he chose
50 #: clients/inst_ask_config.ycp:72
51 #, ycp-format
52 msgid "You can log in as \"%1\"."
53 msgstr "Sie können sich als \"%1\" einloggen."
54 EOF
56 tmpfiles="$tmpfiles mcomm-test16.out mcomm-test16.err"
57 rm -f mcomm-test16.out
59 : ${MSGCOMM=msgcomm}
60 LC_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
63 result=$?
64 cat mcomm-test16.err | grep -v 'warning: .* encodings' | grep -v '^ '
65 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
67 tmpfiles="$tmpfiles mcomm-test16.ok"
68 cat << \EOF > mcomm-test16.ok
69 # German message file for xyz.
70 # Copyright (C) 1999, 2000, 2001 xyz.
71 # Kab Def <ke@zzz.uucp>, 2000.
73 msgid ""
74 msgstr ""
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"
84 #. Help text (HTML-like) START
85 #: clients/inst_ask_config.ycp:119
86 msgid "Congratulations!"
87 msgstr "Glückwunsch!"
89 #. Remind user of the login name he chose
90 #: clients/inst_ask_config.ycp:72
91 #, ycp-format
92 msgid "You can log in as \"%1\"."
93 msgstr "Sie können sich als \"%1\" einloggen."
94 EOF
96 : ${DIFF=diff}
97 ${DIFF} mcomm-test16.ok mcomm-test16.out
98 result=$?
100 rm -fr $tmpfiles
102 exit $result