11052Sdg#!/bin/sh
21052Sdg
31052Sdg# Test of Perl support with UTF-8 encoded input.
41052Sdg
51052Sdgtmpfiles=""
61052Sdgtrap 'rm -fr $tmpfiles' 1 2 3 15
71052Sdg
81052Sdgtmpfiles="$tmpfiles xg-pl-3.pl"
91052Sdgcat <<\EOF > xg-pl-3.pl
101052Sdguse charnames ':full';
111052Sdgprintf "%s\n", gettext "B��se B��bchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?";
121052Sdgprint gettext <<STR
131052SdgDie europ��ische W��hrung ist \N{EURO SIGN}.
141052SdgSTR
151052SdgEOF
161052Sdg
171052Sdgtmpfiles="$tmpfiles xg-pl-3.po"
181052Sdg: ${XGETTEXT=xgettext}
191052Sdg# delete POT-Creation-Date: line because the date depends on local time.
201052Sdg${XGETTEXT} --output - --from-code=UTF-8 xg-pl-3.pl \
211052Sdg  | sed '/\"POT-Creation-Date:.*/d' > xg-pl-3.po
221052Sdgtest $? = 0 || { rm -fr $tmpfiles; exit 1; }
231052Sdg
241052Sdgtmpfiles="$tmpfiles xg-pl-3.ok"
251052Sdgcat <<\EOF > xg-pl-3.ok
261052Sdg# SOME DESCRIPTIVE TITLE.
271052Sdg# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
281052Sdg# This file is distributed under the same license as the PACKAGE package.
2950476Speter# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
301052Sdg#
31163325Sru#, fuzzy
321052Sdgmsgid ""
3379531Srumsgstr ""
341052Sdg"Project-Id-Version: PACKAGE VERSION\n"
351052Sdg"Report-Msgid-Bugs-To: \n"
361052Sdg"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
371052Sdg"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
3859460Sphantom"Language-Team: LANGUAGE <LL@li.org>\n"
3959460Sphantom"MIME-Version: 1.0\n"
401052Sdg"Content-Type: text/plain; charset=UTF-8\n"
4184306Sru"Content-Transfer-Encoding: 8bit\n"
4284306Sru
431052Sdg#: xg-pl-3.pl:2
441052Sdgmsgid "B��se B��bchen - wo sind sie blo��?"
451052Sdgmsgstr ""
461052Sdg
471052Sdg#: xg-pl-3.pl:4
48108035Srumsgid "Die europ��ische W��hrung ist ���.\n"
491052Sdgmsgstr ""
50108035SruEOF
51163324Sru
521052Sdg: ${DIFF=diff}
53108035Sru${DIFF} xg-pl-3.ok xg-pl-3.po
541052Sdgresult=$?
55108035Sru
56163324Srurm -fr $tmpfiles
571052Sdg
58163324Sruexit $result
59163324Sru