Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-8
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 # and different contents. The resulting header entry must be marked fuzzy.
6
7 cat <<\EOF > mcat-test8.in1
8 # German message file for xyz.
9 # Copyright (C) 1999, 2000, 2001 xyz.
10 # Kab Def <ke@zzz.uucp>, 2000.
11 # Def Kab <dk@zzz.uucp>, 2001.
12 #
13 msgid ""
14 msgstr ""
15 "Project-Id-Version: xyz\n"
16 "POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
17 "PO-Revision-Date: 2001-11-11 13:02+02:00\n"
18 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
19 "Language-Team: German <i18n@zzz.uucp>\n"
20 "MIME-Version: 1.0\n"
21 "Content-Type: text/plain; charset=ISO-8859-1\n"
22 "Content-Transfer-Encoding: 8bit\n"
23
24 #. Help text (HTML-like) START
25 #: clients/inst_ask_config.ycp:119
26 msgid ""
27 "Congratulations!"
28 msgstr ""
29 "Glückwunsch!"
30 EOF
31
32 cat <<\EOF > mcat-test8.in2
33 # German message file for xyz.
34 # Copyright (C) 1999, 2000, 2001 xyz.
35 # Kab Def <ke@zzz.uucp>, 2000.
36 #
37 msgid ""
38 msgstr ""
39 "Project-Id-Version: xyz\n"
40 "POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
41 "PO-Revision-Date: 2001-04-24 13:02+02:00\n"
42 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
43 "Language-Team: German <i18n@zzz.uucp>\n"
44 "MIME-Version: 1.0\n"
45 "Content-Type: text/plain; charset=ISO-8859-1\n"
46 "Content-Transfer-Encoding: 8bit\n"
47
48 #. Help text (HTML-like) START
49 #: clients/inst_ask_config.ycp:119
50 msgid ""
51 "Congratulations!"
52 msgstr ""
53 "Glückwunsch!"
54 EOF
55
56 rm -f mcat-test8.tmp
57
58 : ${MSGCAT=msgcat}
59 ${MSGCAT} --more-than=0 -o mcat-test8.tmp \
60     mcat-test8.in1 mcat-test8.in2 || exit 1
61 LC_ALL=C tr -d '\r' < mcat-test8.tmp > mcat-test8.out || exit 1
62
63 cat <<\EOF > mcat-test8.ok
64 # #-#-#-#-#  mcat-test8.in1 (xyz)  #-#-#-#-#
65 # German message file for xyz.
66 # Copyright (C) 1999, 2000, 2001 xyz.
67 # Kab Def <ke@zzz.uucp>, 2000.
68 # Def Kab <dk@zzz.uucp>, 2001.
69 #
70 # #-#-#-#-#  mcat-test8.in2 (xyz)  #-#-#-#-#
71 # German message file for xyz.
72 # Copyright (C) 1999, 2000, 2001 xyz.
73 # Kab Def <ke@zzz.uucp>, 2000.
74 #
75 #, fuzzy
76 msgid ""
77 msgstr ""
78 "#-#-#-#-#  mcat-test8.in1 (xyz)  #-#-#-#-#\n"
79 "Project-Id-Version: xyz\n"
80 "POT-Creation-Date: 2001-11-11 12:51:34+0200\n"
81 "PO-Revision-Date: 2001-11-11 13:02+02:00\n"
82 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
83 "Language-Team: German <i18n@zzz.uucp>\n"
84 "MIME-Version: 1.0\n"
85 "Content-Type: text/plain; charset=ISO-8859-1\n"
86 "Content-Transfer-Encoding: 8bit\n"
87 "#-#-#-#-#  mcat-test8.in2 (xyz)  #-#-#-#-#\n"
88 "Project-Id-Version: xyz\n"
89 "POT-Creation-Date: 2001-04-24 12:51:34+0200\n"
90 "PO-Revision-Date: 2001-04-24 13:02+02:00\n"
91 "Last-Translator: Kab Def <ke@zzz.uucp>\n"
92 "Language-Team: German <i18n@zzz.uucp>\n"
93 "MIME-Version: 1.0\n"
94 "Content-Type: text/plain; charset=ISO-8859-1\n"
95 "Content-Transfer-Encoding: 8bit\n"
96
97 #. Help text (HTML-like) START
98 #: clients/inst_ask_config.ycp:119
99 msgid "Congratulations!"
100 msgstr "Glückwunsch!"
101 EOF
102
103 : ${DIFF=diff}
104 ${DIFF} mcat-test8.ok mcat-test8.out
105 result=$?
106
107 exit $result