No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgmerge-11
blob32ca042bb945a6fa021dc505fbc3962bf29ec25a
1 #! /bin/sh
3 # Test merging of a message which has plural forms in ref.pot but not
4 # in def.po.
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles="$tmpfiles mm-test11.po"
10 cat <<EOF > mm-test11.po
11 # SOME DESCRIPTIVE TITLE.
12 # Copyright (C) YEAR Free Software Foundation, Inc.
13 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
15 msgid ""
16 msgstr ""
17 "Project-Id-Version: cog_training 1.0\n"
18 "POT-Creation-Date: 2001-04-29 22:40+0200\n"
19 "PO-Revision-Date: 2001-04-29 21:19+02:00\n"
20 "Last-Translator: Felix N. <xyz@zyx.uucp>\n"
21 "Language-Team: German <de@li.org>\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=ISO-8859-1\n"
24 "Content-Transfer-Encoding: 8bit\n"
25 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
26 "%100==4 ? 2 : 3);\n"
28 #:foobar.c:29
29 #, c-format
30 msgid "%d error"
31 msgstr "%d erreur"
32 EOF
34 tmpfiles="$tmpfiles mm-test11.pot"
35 cat <<EOF > mm-test11.pot
36 # SOME DESCRIPTIVE TITLE.
37 # Copyright (C) YEAR Free Software Foundation, Inc.
38 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
40 msgid ""
41 msgstr ""
42 "Project-Id-Version: PACKAGE VERSION\n"
43 "POT-Creation-Date: 2001-04-30 18:51+0200\n"
44 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
45 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
46 "Language-Team: LANGUAGE <LL@li.org>\n"
47 "MIME-Version: 1.0\n"
48 "Content-Type: text/plain; charset=ISO-8859-1\n"
49 "Content-Transfer-Encoding: 8bit\n"
51 #:foobar.c:32
52 #, c-format
53 msgid "%d error"
54 msgid_plural "%d errors"
55 msgstr[0] ""
56 msgstr[1] ""
57 EOF
59 tmpfiles="$tmpfiles mm-test11.out"
60 : ${MSGMERGE=msgmerge}
61 ${MSGMERGE} -q mm-test11.po mm-test11.pot -o mm-test11.out
62 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
64 tmpfiles="$tmpfiles mm-test11.ok"
65 cat <<EOF > mm-test11.ok
66 # SOME DESCRIPTIVE TITLE.
67 # Copyright (C) YEAR Free Software Foundation, Inc.
68 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
70 msgid ""
71 msgstr ""
72 "Project-Id-Version: cog_training 1.0\n"
73 "POT-Creation-Date: 2001-04-30 18:51+0200\n"
74 "PO-Revision-Date: 2001-04-29 21:19+02:00\n"
75 "Last-Translator: Felix N. <xyz@zyx.uucp>\n"
76 "Language-Team: German <de@li.org>\n"
77 "MIME-Version: 1.0\n"
78 "Content-Type: text/plain; charset=ISO-8859-1\n"
79 "Content-Transfer-Encoding: 8bit\n"
80 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
81 "%100==4 ? 2 : 3);\n"
83 #: foobar.c:32
84 #, fuzzy, c-format
85 msgid "%d error"
86 msgid_plural "%d errors"
87 msgstr[0] "%d erreur"
88 msgstr[1] "%d erreur"
89 msgstr[2] "%d erreur"
90 msgstr[3] "%d erreur"
91 EOF
93 : ${DIFF=diff}
94 ${DIFF} mm-test11.ok mm-test11.out
95 result=$?
97 rm -fr $tmpfiles
99 exit $result