1#!/bin/sh 2 3# Test of Perl support with ISO-8859-1 encoded input. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-pl-2.pl" 9cat <<\EOF > xg-pl-2.pl 10use charnames ':full'; 11printf "%s\n", gettext "B�se B�bchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?"; 12print gettext <<STR 13Die europ�ische W�hrung ist \N{EURO SIGN}. 14STR 15EOF 16 17tmpfiles="$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 22test $? = 0 || { rm -fr $tmpfiles; exit 1; } 23 24tmpfiles="$tmpfiles xg-pl-2.ok" 25cat <<\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. 30# 31#, fuzzy 32msgid "" 33msgstr "" 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" 42 43#: xg-pl-2.pl:2 44msgid "Böse Bübchen - wo sind sie bloß?" 45msgstr "" 46 47#: xg-pl-2.pl:4 48msgid "Die europäische Währung ist €.\n" 49msgstr "" 50EOF 51 52: ${DIFF=diff} 53${DIFF} xg-pl-2.ok xg-pl-2.po 54result=$? 55 56rm -fr $tmpfiles 57 58exit $result 59