No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcat-4
blob9536b283a01e7d42344d431a9b16a902747a525f
1 #! /bin/sh
3 # Test handling of input files with different charsets:
4 # 1. UTF-8, 2. ISO-8859-1; plus --use-first
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles="$tmpfiles mcat-test4.in1 mcat-test4.in2"
10 cat <<\EOF > mcat-test4.in1
11 # German message file for xyz.
12 # Copyright (C) 1999, 2000, 2001 xyz.
13 # Kab Def <ke@zzz.uucp>, 2000.
15 msgid ""
16 msgstr ""
17 "Project-Id-Version: xyz\n"
18 "POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
19 "PO-Revision-Date: 2001-04-24 13:02+02:00\n"
20 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
21 "Language-Team: German <i18n@zzz.uucp>\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=UTF-8\n"
24 "Content-Transfer-Encoding: 8bit\n"
26 #. Remind user of the login name he chose
27 #: clients/inst_ask_config.ycp:72
28 #, ycp-format
29 msgid "You can log in as \"%1\"."
30 msgstr "Sie können sich als \"%1\" einloggen."
31 EOF
33 cat <<\EOF > mcat-test4.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=ISO-8859-1\n"
47 "Content-Transfer-Encoding: 8bit\n"
49 #. Help text (HTML-like) START
50 #: clients/inst_ask_config.ycp:119
51 msgid ""
52 "Congratulations!"
53 msgstr ""
54 "Glückwunsch!"
55 EOF
57 tmpfiles="$tmpfiles mcat-test4.out mcat-test4.err"
58 rm -f mcat-test4.out
60 : ${MSGCAT=msgcat}
61 LC_MESSAGES=C LC_ALL= \
62 ${MSGCAT} --use-first --more-than=0 -o mcat-test4.out \
63 mcat-test4.in1 mcat-test4.in2 >mcat-test4.err 2>&1
64 result=$?
65 cat mcat-test4.err | grep -v 'warning: .* encodings' | grep -v '^ '
66 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
68 tmpfiles="$tmpfiles mcat-test4.ok"
69 cat << \EOF > mcat-test4.ok
70 # German message file for xyz.
71 # Copyright (C) 1999, 2000, 2001 xyz.
72 # Kab Def <ke@zzz.uucp>, 2000.
74 msgid ""
75 msgstr ""
76 "Project-Id-Version: xyz\n"
77 "POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
78 "PO-Revision-Date: 2001-04-24 13:02+02:00\n"
79 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
80 "Language-Team: German <i18n@zzz.uucp>\n"
81 "MIME-Version: 1.0\n"
82 "Content-Type: text/plain; charset=UTF-8\n"
83 "Content-Transfer-Encoding: 8bit\n"
85 #. Remind user of the login name he chose
86 #: clients/inst_ask_config.ycp:72
87 #, ycp-format
88 msgid "You can log in as \"%1\"."
89 msgstr "Sie können sich als \"%1\" einloggen."
91 #. Help text (HTML-like) START
92 #: clients/inst_ask_config.ycp:119
93 msgid "Congratulations!"
94 msgstr "Glückwunsch!"
95 EOF
97 : ${DIFF=diff}
98 ${DIFF} mcat-test4.ok mcat-test4.out
99 result=$?
101 rm -fr $tmpfiles
103 exit $result