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