Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-perl-2
1 #!/bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test of Perl support with ISO-8859-1 encoded input.
5
6 cat <<\EOF > xg-pl-2.pl
7 use charnames ':full';
8 printf "%s\n", gettext "Böse Bübchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?";
9 print gettext <<STR
10 Die europäische Währung ist \N{EURO SIGN}.
11 STR
12 EOF
13
14 : ${XGETTEXT=xgettext}
15 # delete POT-Creation-Date: line because the date depends on local time.
16 ${XGETTEXT} --output - --from-code=ISO-8859-1 xg-pl-2.pl \
17   | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-pl-2.po || exit 1
18
19 cat <<\EOF > xg-pl-2.ok
20 # SOME DESCRIPTIVE TITLE.
21 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
22 # This file is distributed under the same license as the PACKAGE package.
23 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
24 #
25 #, fuzzy
26 msgid ""
27 msgstr ""
28 "Project-Id-Version: PACKAGE VERSION\n"
29 "Report-Msgid-Bugs-To: \n"
30 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
31 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
32 "Language-Team: LANGUAGE <LL@li.org>\n"
33 "Language: \n"
34 "MIME-Version: 1.0\n"
35 "Content-Type: text/plain; charset=UTF-8\n"
36 "Content-Transfer-Encoding: 8bit\n"
37
38 #: xg-pl-2.pl:2
39 msgid "Böse Bübchen - wo sind sie bloß?"
40 msgstr ""
41
42 #: xg-pl-2.pl:4
43 msgid "Die europäische Währung ist €.\n"
44 msgstr ""
45 EOF
46
47 : ${DIFF=diff}
48 ${DIFF} xg-pl-2.ok xg-pl-2.po
49 result=$?
50
51 exit $result