375f19bafc258d9b1d0ccb3719dcbf499992e259
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-update-3
1 #! /bin/sh
2
3 # Test --update: POT-Creation-Date changed. This change must not be reflected
4 # in the resulting PO file; this is needed for projects which don't put the
5 # .pot file under CVS.
6
7 tmpfiles=""
8 trap 'rm -fr $tmpfiles' 1 2 3 15
9
10 tmpfiles="$tmpfiles mm-u-3.po"
11 cat <<\EOF > mm-u-3.po
12 # SOME DESCRIPTIVE TITLE.
13 # Copyright (C) YEAR Free Software Foundation, Inc.
14 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
15 #
16 msgid ""
17 msgstr ""
18 "Project-Id-Version: cog_training 1.0\n"
19 "POT-Creation-Date: 2001-04-29 22:40+0200\n"
20 "PO-Revision-Date: 2001-04-29 21:19+02:00\n"
21 "Last-Translator: Felix N. <xyz@zyx.uucp>\n"
22 "Language-Team: German <de@li.org>\n"
23 "Language: de\n"
24 "MIME-Version: 1.0\n"
25 "Content-Type: text/plain; charset=ISO-8859-1\n"
26 "Content-Transfer-Encoding: 8bit\n"
27
28 #: cogarithmetic.cc:12 cogidmarkup.cc:288 cogroman.cc:14
29 msgid "white"
30 msgstr "weiß"
31 EOF
32
33 tmpfiles="$tmpfiles mm-u-3.pot"
34 cat <<EOF > mm-u-3.pot
35 # SOME DESCRIPTIVE TITLE.
36 # Copyright (C) YEAR Free Software Foundation, Inc.
37 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
38 #
39 msgid ""
40 msgstr ""
41 "Project-Id-Version: PACKAGE VERSION\n"
42 "POT-Creation-Date: 2001-04-30 18:51+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=ISO-8859-1\n"
48 "Content-Transfer-Encoding: 8bit\n"
49
50 #: cogarithmetic.cc:12 cogidmarkup.cc:288 cogroman.cc:14
51 msgid "white"
52 msgstr ""
53 EOF
54
55 tmpfiles="$tmpfiles mm-u-3.po~"
56 : ${MSGMERGE=msgmerge}
57 ${MSGMERGE} -q --update mm-u-3.po mm-u-3.pot
58 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
59
60 tmpfiles="$tmpfiles mm-u-3.ok"
61 cat <<\EOF > mm-u-3.ok
62 # SOME DESCRIPTIVE TITLE.
63 # Copyright (C) YEAR Free Software Foundation, Inc.
64 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
65 #
66 msgid ""
67 msgstr ""
68 "Project-Id-Version: cog_training 1.0\n"
69 "POT-Creation-Date: 2001-04-29 22:40+0200\n"
70 "PO-Revision-Date: 2001-04-29 21:19+02:00\n"
71 "Last-Translator: Felix N. <xyz@zyx.uucp>\n"
72 "Language-Team: German <de@li.org>\n"
73 "Language: de\n"
74 "MIME-Version: 1.0\n"
75 "Content-Type: text/plain; charset=ISO-8859-1\n"
76 "Content-Transfer-Encoding: 8bit\n"
77
78 #: cogarithmetic.cc:12 cogidmarkup.cc:288 cogroman.cc:14
79 msgid "white"
80 msgstr "weiß"
81 EOF
82
83 : ${DIFF=diff}
84 ${DIFF} mm-u-3.ok mm-u-3.po
85 result=$?
86
87 rm -fr $tmpfiles
88
89 exit $result