Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-10
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Verify msgcat of two files, when the header entries have different comments
5 # but the same contents. The resulting header entry is not marked fuzzy,
6 # because the #-#-#-#-# are only in comments and do not necessarily require
7 # translator attention; in other words, an msgstr which is valid in both input
8 # files is also valid in the result.
9
10 cat <<\EOF > mcat-test10.in1
11 # German message file for xyz.
12 # Copyright (C) 1999, 2000, 2001 xyz.
13 # Kab Def <ke@zzz.uucp>, 2000.
14 # Def Kab <dk@zzz.uucp>, 2001.
15 #
16 msgid ""
17 msgstr ""
18 "Project-Id-Version: xyz\n"
19 "POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
20 "PO-Revision-Date: 2001-11-11 13:02+02:00\n"
21 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
22 "Language-Team: German <i18n@zzz.uucp>\n"
23 "MIME-Version: 1.0\n"
24 "Content-Type: text/plain; charset=ISO-8859-1\n"
25 "Content-Transfer-Encoding: 8bit\n"
26
27 #. Help text (HTML-like) START
28 #: clients/inst_ask_config.ycp:119
29 msgid ""
30 "Congratulations!"
31 msgstr ""
32 "Glückwunsch!"
33 EOF
34
35 cat <<\EOF > mcat-test10.in2
36 # German message file for xyz.
37 # Copyright (C) 1999, 2000, 2001 xyz.
38 # Kab Def <ke@zzz.uucp>, 2000.
39 #
40 msgid ""
41 msgstr ""
42 "Project-Id-Version: xyz\n"
43 "POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
44 "PO-Revision-Date: 2001-11-11 13:02+02:00\n"
45 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
46 "Language-Team: German <i18n@zzz.uucp>\n"
47 "MIME-Version: 1.0\n"
48 "Content-Type: text/plain; charset=ISO-8859-1\n"
49 "Content-Transfer-Encoding: 8bit\n"
50
51 #. Help text (HTML-like) START
52 #: clients/inst_ask_config.ycp:119
53 msgid ""
54 "Congratulations!"
55 msgstr ""
56 "Glückwunsch!"
57 EOF
58
59 rm -f mcat-test10.tmp
60
61 : ${MSGCAT=msgcat}
62 ${MSGCAT} --more-than=0 -o mcat-test10.tmp \
63     mcat-test10.in1 mcat-test10.in2 || exit 1
64 LC_ALL=C tr -d '\r' < mcat-test10.tmp > mcat-test10.out || exit 1
65
66 cat <<\EOF > mcat-test10.ok
67 # #-#-#-#-#  mcat-test10.in1 (xyz)  #-#-#-#-#
68 # German message file for xyz.
69 # Copyright (C) 1999, 2000, 2001 xyz.
70 # Kab Def <ke@zzz.uucp>, 2000.
71 # Def Kab <dk@zzz.uucp>, 2001.
72 #
73 # #-#-#-#-#  mcat-test10.in2 (xyz)  #-#-#-#-#
74 # German message file for xyz.
75 # Copyright (C) 1999, 2000, 2001 xyz.
76 # Kab Def <ke@zzz.uucp>, 2000.
77 #
78 msgid ""
79 msgstr ""
80 "Project-Id-Version: xyz\n"
81 "POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
82 "PO-Revision-Date: 2001-11-11 13:02+02:00\n"
83 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
84 "Language-Team: German <i18n@zzz.uucp>\n"
85 "MIME-Version: 1.0\n"
86 "Content-Type: text/plain; charset=ISO-8859-1\n"
87 "Content-Transfer-Encoding: 8bit\n"
88
89 #. Help text (HTML-like) START
90 #: clients/inst_ask_config.ycp:119
91 msgid "Congratulations!"
92 msgstr "Glückwunsch!"
93 EOF
94
95 : ${DIFF=diff}
96 ${DIFF} mcat-test10.ok mcat-test10.out
97 result=$?
98
99 exit $result