xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/tests/msgattrib-16 (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1#! /bin/sh
2
3# Test msgattrib on a PO file with previous msgids.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles ma-test16.po"
9cat <<\EOF > ma-test16.po
10msgid ""
11msgstr ""
12"Report-Msgid-Bugs-To: \n"
13"Content-Type: text/plain; charset=UTF-8\n"
14"Content-Transfer-Encoding: 8bit\n"
15
16#. TRANSLATORS: An error message.
17#: src/args.c:242
18#, fuzzy, c-format
19#| msgid "too many arguments"
20msgid "Too many arguments."
21msgstr "zu viele Argumente"
22
23#. TRANSLATORS: An error message.
24#: src/args.c:247
25#, fuzzy, c-format
26#| msgid "too many arguments"
27msgid "Too few arguments."
28msgstr "zu viele Argumente"
29
30# Oder besser "fehlende Argumente"?
31#. TRANSLATORS: An error message.
32#: src/args.c:273
33#, c-format
34#| msgid "missing arguments"
35msgid "Missing arguments."
36msgstr "Argumente fehlen."
37
38#, fuzzy
39#~| msgid "%s: invalid option -- %c\n"
40#~ msgid "%s: illegal option -- %c\n"
41#~ msgstr "%s: ungültige Option -- %c\n"
42
43#~ msgid "%s: invalid option -- %c\n"
44#~ msgstr "%s: ungültige Option -- %c\n"
45EOF
46
47tmpfiles="$tmpfiles ma-test16.out"
48: ${MSGATTRIB=msgattrib}
49${MSGATTRIB} --fuzzy -o ma-test16.out ma-test16.po
50test $? = 0 || { rm -fr $tmpfiles; exit 1; }
51
52tmpfiles="$tmpfiles ma-test16.ok"
53cat <<\EOF > ma-test16.ok
54msgid ""
55msgstr ""
56"Report-Msgid-Bugs-To: \n"
57"Content-Type: text/plain; charset=UTF-8\n"
58"Content-Transfer-Encoding: 8bit\n"
59
60#. TRANSLATORS: An error message.
61#: src/args.c:242
62#, c-format
63#| msgid "too many arguments"
64msgid "Too many arguments."
65msgstr "zu viele Argumente"
66
67#. TRANSLATORS: An error message.
68#: src/args.c:247
69#, c-format
70#| msgid "too many arguments"
71msgid "Too few arguments."
72msgstr "zu viele Argumente"
73
74#~| msgid "%s: invalid option -- %c\n"
75#~ msgid "%s: illegal option -- %c\n"
76#~ msgstr "%s: ungültige Option -- %c\n"
77EOF
78
79: ${DIFF=diff}
80${DIFF} ma-test16.ok ma-test16.out
81result=$?
82
83rm -fr $tmpfiles
84
85exit $result
86