summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-perl-3
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-11-03 21:11:36 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:11:11 +0200
commit9917120e8e804fccd7cfad86f8fc5b9c25e84ce1 (patch)
treebc43e4db2b0cfd9d42425719413d33bc9dde8f37 /gettext-tools/tests/xgettext-perl-3
parent81977e7bfc73f7f2a659e598e3a66bf182bfc71d (diff)
downloadexternal_gettext-9917120e8e804fccd7cfad86f8fc5b9c25e84ce1.zip
external_gettext-9917120e8e804fccd7cfad86f8fc5b9c25e84ce1.tar.gz
external_gettext-9917120e8e804fccd7cfad86f8fc5b9c25e84ce1.tar.bz2
Move xgettext-28 to xgettext-perl-3.
Diffstat (limited to 'gettext-tools/tests/xgettext-perl-3')
-rwxr-xr-xgettext-tools/tests/xgettext-perl-358
1 files changed, 58 insertions, 0 deletions
diff --git a/gettext-tools/tests/xgettext-perl-3 b/gettext-tools/tests/xgettext-perl-3
new file mode 100755
index 0000000..e84aafe
--- /dev/null
+++ b/gettext-tools/tests/xgettext-perl-3
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Test of Perl support with UTF-8 encoded input.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test28.pl"
+cat <<\EOF > xg-test28.pl
+use charnames ':full';
+printf "%s\n", gettext "Böse Bübchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?";
+print gettext <<STR
+Die europäische Währung ist \N{EURO SIGN}.
+STR
+EOF
+
+tmpfiles="$tmpfiles xg-test28.po"
+: ${XGETTEXT=xgettext}
+# delete POT-Creation-Date: line because the date depends on local time.
+${XGETTEXT} --output - --from-code=UTF-8 xg-test28.pl \
+ | sed '/\"POT-Creation-Date:.*/d' > xg-test28.po
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles xg-test28.ok"
+cat <<\EOF > xg-test28.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: xg-test28.pl:2
+msgid "Böse Bübchen - wo sind sie bloß?"
+msgstr ""
+
+#: xg-test28.pl:4
+msgid "Die europäische Währung ist €.\n"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test28.ok xg-test28.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result