xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/tests/msgfmt-16 (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1#! /bin/sh
2
3# Test msgfmt on a PO file with previous msgids.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mf-16.po"
9cat <<\EOF > mf-16.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 mf-16.mo"
48: ${MSGFMT=msgfmt}
49${MSGFMT} -o mf-16.mo mf-16.po
50test $? = 0 || { rm -fr $tmpfiles; exit 1; }
51
52tmpfiles="$tmpfiles mf-16.out"
53: ${MSGUNFMT=msgunfmt}
54${MSGUNFMT} -o mf-16.out mf-16.mo
55test $? = 0 || { rm -fr $tmpfiles; exit 1; }
56
57tmpfiles="$tmpfiles mf-16.ok"
58cat <<\EOF > mf-16.ok
59msgid ""
60msgstr ""
61"Report-Msgid-Bugs-To: \n"
62"Content-Type: text/plain; charset=UTF-8\n"
63"Content-Transfer-Encoding: 8bit\n"
64
65msgid "Missing arguments."
66msgstr "Argumente fehlen."
67EOF
68
69: ${DIFF=diff}
70${DIFF} mf-16.ok mf-16.out
71result=$?
72
73rm -fr $tmpfiles
74
75exit $result
76