Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-16
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test non-ASCII msgids when the PO file and the POT file are in different
5 # encodings.
6
7 cat <<\EOF > mm-test16.po
8 msgid ""
9 msgstr ""
10 "Project-Id-Version: hello-cplusplus-qt 0\n"
11 "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
12 "POT-Creation-Date: 2003-10-20 10:14+0200\n"
13 "PO-Revision-Date: 2003-10-20 10:13+0200\n"
14 "Last-Translator: Bruno Haible <bruno@clisp.org>\n"
15 "Language-Team: Polish <pl@li.org>\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=ISO-8859-2\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
20 "|| n%100>=20) ? 1 : 2);\n"
21
22 #: hello.cc:45
23 msgid "Written by François Pinard."
24 msgstr "Program napisa³ François Pinard."
25
26 #: hello.cc:52
27 msgid "error %1."
28 msgstr "b³±d %1."
29 EOF
30
31 cat <<EOF > mm-test16.pot
32 # SOME DESCRIPTIVE TITLE.
33 # Copyright (C) YEAR Yoyodyne, Inc.
34 # This file is distributed under the same license as the PACKAGE package.
35 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
36 #
37 #, fuzzy
38 msgid ""
39 msgstr ""
40 "Project-Id-Version: PACKAGE VERSION\n"
41 "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
42 "POT-Creation-Date: 2003-10-20 10:14+0200\n"
43 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
44 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
45 "Language-Team: LANGUAGE <LL@li.org>\n"
46 "MIME-Version: 1.0\n"
47 "Content-Type: text/plain; charset=UTF-8\n"
48 "Content-Transfer-Encoding: 8bit\n"
49
50 #: hello.cc:45
51 msgid "Written by François Pinard."
52 msgstr ""
53
54 #: hello.cc:52
55 msgid "error %1."
56 msgstr ""
57 EOF
58
59 : ${MSGMERGE=msgmerge}
60 ${MSGMERGE} -q -o mm-test16.tmp.po mm-test16.po mm-test16.pot || exit 1
61 LC_ALL=C tr -d '\r' < mm-test16.tmp.po > mm-test16.new.po || exit 1
62
63 cat <<\EOF > mm-test16.ok
64 msgid ""
65 msgstr ""
66 "Project-Id-Version: hello-cplusplus-qt 0\n"
67 "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
68 "POT-Creation-Date: 2003-10-20 10:14+0200\n"
69 "PO-Revision-Date: 2003-10-20 10:13+0200\n"
70 "Last-Translator: Bruno Haible <bruno@clisp.org>\n"
71 "Language-Team: Polish <pl@li.org>\n"
72 "Language: pl\n"
73 "MIME-Version: 1.0\n"
74 "Content-Type: text/plain; charset=UTF-8\n"
75 "Content-Transfer-Encoding: 8bit\n"
76 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
77 "|| n%100>=20) ? 1 : 2);\n"
78
79 #: hello.cc:45
80 msgid "Written by François Pinard."
81 msgstr "Program napisał François Pinard."
82
83 #: hello.cc:52
84 msgid "error %1."
85 msgstr "błąd %1."
86 EOF
87
88 : ${DIFF=diff}
89 ${DIFF} mm-test16.ok mm-test16.new.po
90 result=$?
91
92 exit $result