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