1#! /bin/sh
2
3# Test msgmerge --previous option.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mm-test19.po"
9cat <<\EOF > mm-test19.po
10msgid ""
11msgstr ""
12"Content-Type: text/plain; charset=UTF-8\n"
13"Content-Transfer-Encoding: 8bit\n"
14
15#. TRANSLATORS: An error message.
16#: src/args.c:242
17#, c-format
18msgid "too many arguments"
19msgstr "zu viele Argumente"
20
21# Oder besser "fehlende Argumente"?
22#. TRANSLATORS: An error message.
23#: src/args.c:273
24#, c-format
25msgid "missing arguments"
26msgstr "Argumente fehlen"
27
28#: getopt.c:805 getopt.c:808
29#, c-format
30msgid "%s: invalid option -- %c\n"
31msgstr "%s: ung��ltige Option -- %c\n"
32EOF
33
34tmpfiles="$tmpfiles mm-test19.pot"
35cat <<\EOF > mm-test19.pot
36# SOME DESCRIPTIVE TITLE.
37# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
38# This file is distributed under the same license as the PACKAGE package.
39# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
40#
41#, fuzzy
42msgid ""
43msgstr ""
44"Project-Id-Version: PACKAGE VERSION\n"
45"Report-Msgid-Bugs-To: \n"
46"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
47"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
48"Language-Team: LANGUAGE <LL@li.org>\n"
49"MIME-Version: 1.0\n"
50"Content-Type: text/plain; charset=UTF-8\n"
51"Content-Transfer-Encoding: 8bit\n"
52
53#. TRANSLATORS: An error message.
54#: src/args.c:242
55#, c-format
56msgid "too many arguments"
57msgstr ""
58
59#. TRANSLATORS: An error message.
60#: src/args.c:247
61#, c-format
62msgid "too few arguments"
63msgstr ""
64
65# Oder besser "fehlende Argumente"?
66#. TRANSLATORS: An error message.
67#: src/args.c:273
68#, c-format
69msgid "missing arguments"
70msgstr ""
71
72#: getopt.c:796 getopt.c:799
73#, c-format
74msgid "%s: illegal option -- %c\n"
75msgstr ""
76
77#: getopt.c:805 getopt.c:808
78#, c-format
79msgid "%s: invalid option -- %c\n"
80msgstr ""
81EOF
82
83tmpfiles="$tmpfiles mm-test19.new1.po"
84: ${MSGMERGE=msgmerge}
85${MSGMERGE} -q --previous -o mm-test19.new1.po mm-test19.po mm-test19.pot
86test $? = 0 || { rm -fr $tmpfiles; exit 1; }
87
88tmpfiles="$tmpfiles mm-test19.ok1"
89cat <<\EOF > mm-test19.ok1
90msgid ""
91msgstr ""
92"Report-Msgid-Bugs-To: \n"
93"Content-Type: text/plain; charset=UTF-8\n"
94"Content-Transfer-Encoding: 8bit\n"
95
96#. TRANSLATORS: An error message.
97#: src/args.c:242
98#, c-format
99msgid "too many arguments"
100msgstr "zu viele Argumente"
101
102#. TRANSLATORS: An error message.
103#: src/args.c:247
104#, fuzzy, c-format
105#| msgid "too many arguments"
106msgid "too few arguments"
107msgstr "zu viele Argumente"
108
109# Oder besser "fehlende Argumente"?
110#. TRANSLATORS: An error message.
111#: src/args.c:273
112#, c-format
113msgid "missing arguments"
114msgstr "Argumente fehlen"
115
116#: getopt.c:796 getopt.c:799
117#, fuzzy, c-format
118#| msgid "%s: invalid option -- %c\n"
119msgid "%s: illegal option -- %c\n"
120msgstr "%s: ung��ltige Option -- %c\n"
121
122#: getopt.c:805 getopt.c:808
123#, c-format
124msgid "%s: invalid option -- %c\n"
125msgstr "%s: ung��ltige Option -- %c\n"
126EOF
127
128: ${DIFF=diff}
129${DIFF} mm-test19.ok1 mm-test19.new1.po
130test $? = 0 || { rm -fr $tmpfiles; exit 1; }
131
132tmpfiles="$tmpfiles mm-test19.pot"
133cat <<\EOF > mm-test19.pot
134# SOME DESCRIPTIVE TITLE.
135# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
136# This file is distributed under the same license as the PACKAGE package.
137# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
138#
139#, fuzzy
140msgid ""
141msgstr ""
142"Project-Id-Version: PACKAGE VERSION\n"
143"Report-Msgid-Bugs-To: \n"
144"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
145"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
146"Language-Team: LANGUAGE <LL@li.org>\n"
147"MIME-Version: 1.0\n"
148"Content-Type: text/plain; charset=UTF-8\n"
149"Content-Transfer-Encoding: 8bit\n"
150
151#. TRANSLATORS: An error message.
152#: src/args.c:242
153#, c-format
154msgid "Too many arguments."
155msgstr ""
156
157#. TRANSLATORS: An error message.
158#: src/args.c:247
159#, c-format
160msgid "Too few arguments."
161msgstr ""
162
163# Oder besser "fehlende Argumente"?
164#. TRANSLATORS: An error message.
165#: src/args.c:273
166#, c-format
167msgid "Missing arguments."
168msgstr ""
169EOF
170
171tmpfiles="$tmpfiles mm-test19.new2.po"
172: ${MSGMERGE=msgmerge}
173${MSGMERGE} -q --previous -o mm-test19.new2.po mm-test19.new1.po mm-test19.pot
174test $? = 0 || { rm -fr $tmpfiles; exit 1; }
175
176tmpfiles="$tmpfiles mm-test19.ok2"
177cat <<\EOF > mm-test19.ok2
178msgid ""
179msgstr ""
180"Report-Msgid-Bugs-To: \n"
181"Content-Type: text/plain; charset=UTF-8\n"
182"Content-Transfer-Encoding: 8bit\n"
183
184#. TRANSLATORS: An error message.
185#: src/args.c:242
186#, fuzzy, c-format
187#| msgid "too many arguments"
188msgid "Too many arguments."
189msgstr "zu viele Argumente"
190
191#. TRANSLATORS: An error message.
192#: src/args.c:247
193#, fuzzy, c-format
194#| msgid "too many arguments"
195msgid "Too few arguments."
196msgstr "zu viele Argumente"
197
198# Oder besser "fehlende Argumente"?
199#. TRANSLATORS: An error message.
200#: src/args.c:273
201#, fuzzy, c-format
202#| msgid "missing arguments"
203msgid "Missing arguments."
204msgstr "Argumente fehlen"
205
206#, fuzzy
207#~| msgid "%s: invalid option -- %c\n"
208#~ msgid "%s: illegal option -- %c\n"
209#~ msgstr "%s: ung��ltige Option -- %c\n"
210
211#~ msgid "%s: invalid option -- %c\n"
212#~ msgstr "%s: ung��ltige Option -- %c\n"
213EOF
214
215: ${DIFF=diff}
216${DIFF} mm-test19.ok2 mm-test19.new2.po
217test $? = 0 || { rm -fr $tmpfiles; exit 1; }
218
219rm -fr $tmpfiles
220
221exit 0
222