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