#!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test of Perl support with UTF-8 encoded input.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-pl-3.pl"
cat <<\EOF > xg-pl-3.pl
use charnames ':full';
printf "%s\n", gettext "Böse Bübchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?";
STR
EOF
-tmpfiles="$tmpfiles xg-pl-3.po"
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
${XGETTEXT} --output - --from-code=UTF-8 xg-pl-3.pl \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-pl-3.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+ | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-pl-3.po || exit 1
-tmpfiles="$tmpfiles xg-pl-3.ok"
cat <<\EOF > xg-pl-3.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
${DIFF} xg-pl-3.ok xg-pl-3.po
result=$?
-rm -fr $tmpfiles
-
exit $result