Add -lm dependency for gettextlib to fix LTO build
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-15
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test msgcat on a PO file with previous msgids.
5
6 cat <<\EOF > mcat-test15.in
7 msgid ""
8 msgstr ""
9 "Report-Msgid-Bugs-To: \n"
10 "Content-Type: text/plain; charset=UTF-8\n"
11 "Content-Transfer-Encoding: 8bit\n"
12
13 #. TRANSLATORS: An error message.
14 #: src/args.c:242
15 #, fuzzy, c-format
16 #| msgid "too many arguments"
17 msgid "Too many arguments."
18 msgstr "zu viele Argumente"
19
20 #. TRANSLATORS: An error message.
21 #: src/args.c:247
22 #, fuzzy, c-format
23 #| msgid "too many arguments"
24 msgid "Too few arguments."
25 msgstr "zu viele Argumente"
26
27 # Oder besser "fehlende Argumente"?
28 #. TRANSLATORS: An error message.
29 #: src/args.c:273
30 #, c-format
31 #| msgid "missing arguments"
32 msgid "Missing arguments."
33 msgstr "Argumente fehlen."
34
35 #, fuzzy
36 #~| msgid "%s: invalid option -- %c\n"
37 #~ msgid "%s: illegal option -- %c\n"
38 #~ msgstr "%s: ungültige Option -- %c\n"
39
40 #~ msgid "%s: invalid option -- %c\n"
41 #~ msgstr "%s: ungültige Option -- %c\n"
42 EOF
43
44 rm -f mcat-test15.tmp1
45 : ${MSGCAT=msgcat}
46 ${MSGCAT} -o mcat-test15.tmp1 mcat-test15.in || exit 1
47 LC_ALL=C tr -d '\r' < mcat-test15.tmp1 > mcat-test15.out1 || exit 1
48
49 : ${DIFF=diff}
50 ${DIFF} mcat-test15.in mcat-test15.out1
51 result=$?
52
53 rm -f mcat-test15.tmp2
54 : ${MSGCAT=msgcat}
55 ${MSGCAT} --indent -o mcat-test15.tmp2 mcat-test15.in || exit 1
56 LC_ALL=C tr -d '\r' < mcat-test15.tmp2 > mcat-test15.out2 || exit 1
57
58 cat <<\EOF > mcat-test15.ok
59 msgid   ""
60 msgstr  "Report-Msgid-Bugs-To: \n"
61         "Content-Type: text/plain; charset=UTF-8\n"
62         "Content-Transfer-Encoding: 8bit\n"
63
64 #. TRANSLATORS: An error message.
65 #: src/args.c:242
66 #, fuzzy, c-format
67 #| msgid        "too many arguments"
68 msgid           "Too many arguments."
69 msgstr          "zu viele Argumente"
70
71 #. TRANSLATORS: An error message.
72 #: src/args.c:247
73 #, fuzzy, c-format
74 #| msgid        "too many arguments"
75 msgid           "Too few arguments."
76 msgstr          "zu viele Argumente"
77
78 # Oder besser "fehlende Argumente"?
79 #. TRANSLATORS: An error message.
80 #: src/args.c:273
81 #, c-format
82 #| msgid        "missing arguments"
83 msgid           "Missing arguments."
84 msgstr          "Argumente fehlen."
85
86 #, fuzzy
87 #~| msgid       "%s: invalid option -- %c\n"
88 #~ msgid        "%s: illegal option -- %c\n"
89 #~ msgstr       "%s: ungültige Option -- %c\n"
90
91 #~ msgid        "%s: invalid option -- %c\n"
92 #~ msgstr       "%s: ungültige Option -- %c\n"
93 EOF
94
95 : ${DIFF=diff}
96 ${DIFF} mcat-test15.ok mcat-test15.out2
97 result=$?
98
99 exit $result