Blame gettext-tools/tests/xgettext-perl-2

Packit Bot 06c835
#!/bin/sh
Packit Bot 06c835
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
Packit Bot 06c835
Packit Bot 06c835
# Test of Perl support with ISO-8859-1 encoded input.
Packit Bot 06c835
Packit Bot 06c835
cat <<\EOF > xg-pl-2.pl
Packit Bot 06c835
use charnames ':full';
Packit Bot 06c835
printf "%s\n", gettext "Böse Bübchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?";
Packit Bot 06c835
print gettext <
Packit Bot 06c835
Die europäische Währung ist \N{EURO SIGN}.
Packit Bot 06c835
STR
Packit Bot 06c835
EOF
Packit Bot 06c835
Packit Bot 06c835
: ${XGETTEXT=xgettext}
Packit Bot 06c835
# delete POT-Creation-Date: line because the date depends on local time.
Packit Bot 06c835
${XGETTEXT} --output - --from-code=ISO-8859-1 xg-pl-2.pl \
Packit Bot 06c835
  | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-pl-2.po || exit 1
Packit Bot 06c835
Packit Bot 06c835
cat <<\EOF > xg-pl-2.ok
Packit Bot 06c835
# SOME DESCRIPTIVE TITLE.
Packit Bot 06c835
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
Packit Bot 06c835
# This file is distributed under the same license as the PACKAGE package.
Packit Bot 06c835
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Packit Bot 06c835
#
Packit Bot 06c835
#, fuzzy
Packit Bot 06c835
msgid ""
Packit Bot 06c835
msgstr ""
Packit Bot 06c835
"Project-Id-Version: PACKAGE VERSION\n"
Packit Bot 06c835
"Report-Msgid-Bugs-To: \n"
Packit Bot 06c835
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Packit Bot 06c835
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
Packit Bot 06c835
"Language-Team: LANGUAGE <LL@li.org>\n"
Packit Bot 06c835
"Language: \n"
Packit Bot 06c835
"MIME-Version: 1.0\n"
Packit Bot 06c835
"Content-Type: text/plain; charset=UTF-8\n"
Packit Bot 06c835
"Content-Transfer-Encoding: 8bit\n"
Packit Bot 06c835
Packit Bot 06c835
#: xg-pl-2.pl:2
Packit Bot 06c835
msgid "Böse Bübchen - wo sind sie bloß?"
Packit Bot 06c835
msgstr ""
Packit Bot 06c835
Packit Bot 06c835
#: xg-pl-2.pl:4
Packit Bot 06c835
msgid "Die europäische Währung ist €.\n"
Packit Bot 06c835
msgstr ""
Packit Bot 06c835
EOF
Packit Bot 06c835
Packit Bot 06c835
: ${DIFF=diff}
Packit Bot 06c835
${DIFF} xg-pl-2.ok xg-pl-2.po
Packit Bot 06c835
result=$?
Packit Bot 06c835
Packit Bot 06c835
exit $result