No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgmerge-17
blob1f3b7f35654cc289c503ea8461e98215256c6055
1 #! /bin/sh
3 # Test that untranslated messages that are brought over from the .pot file
4 # get the right number of msgstrs.
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles="$tmpfiles mm-test17.po"
10 cat <<\EOF > mm-test17.po
11 # Irish translations.
12 msgid ""
13 msgstr ""
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
18 #, c-format
19 msgid "'Your command, please?', asked the waiter."
20 msgstr ""
21 EOF
23 tmpfiles="$tmpfiles mm-test17.pot"
24 cat <<\EOF > mm-test17.pot
25 # SOME DESCRIPTIVE TITLE.
26 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
27 # This file is distributed under the same license as the PACKAGE package.
28 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
30 #, fuzzy
31 msgid ""
32 msgstr ""
33 "Project-Id-Version: PACKAGE VERSION\n"
34 "Report-Msgid-Bugs-To: \n"
35 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
36 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
37 "Language-Team: LANGUAGE <LL@li.org>\n"
38 "MIME-Version: 1.0\n"
39 "Content-Type: text/plain; charset=CHARSET\n"
40 "Content-Transfer-Encoding: 8bit\n"
42 #, c-format
43 msgid "'Your command, please?', asked the waiter."
44 msgstr ""
46 #, c-format
47 msgid "a piece of cake"
48 msgid_plural "%d pieces of cake"
49 msgstr[0] ""
50 msgstr[1] ""
52 #, c-format
53 msgid "%s is replaced by %s."
54 msgstr ""
55 EOF
57 tmpfiles="$tmpfiles mm-test17.new.po"
58 : ${MSGMERGE=msgmerge}
59 ${MSGMERGE} -q mm-test17.po mm-test17.pot -o mm-test17.new.po
60 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
62 tmpfiles="$tmpfiles mm-test17.ok"
63 cat <<\EOF > mm-test17.ok
64 # Irish translations.
65 msgid ""
66 msgstr ""
67 "Report-Msgid-Bugs-To: \n"
68 "Content-Type: text/plain; charset=UTF-8\n"
69 "Content-Transfer-Encoding: 8bit\n"
70 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
72 #, c-format
73 msgid "'Your command, please?', asked the waiter."
74 msgstr ""
76 #, c-format
77 msgid "a piece of cake"
78 msgid_plural "%d pieces of cake"
79 msgstr[0] ""
80 msgstr[1] ""
81 msgstr[2] ""
83 #, c-format
84 msgid "%s is replaced by %s."
85 msgstr ""
86 EOF
88 : ${DIFF=diff}
89 ${DIFF} mm-test17.ok mm-test17.new.po
90 result=$?
92 rm -fr $tmpfiles
94 exit $result