#!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test of Shell support.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-sh-1.sh"
cat <<\EOF > xg-sh-1.sh
# Test backslash before normal alphabetic character.
echo "`echo "\`ngettext 'depth_2_11_squote_8_semi \\\\\\\\;'\`"`"
EOF
-tmpfiles="$tmpfiles xg-sh-1.tmp.po xg-sh-1.po"
: ${XGETTEXT=xgettext}
# Here we use ngettext with two signatures: ngettext:1 and ngettext:1,2.
${XGETTEXT} --omit-header --no-location --keyword=ngettext:1 \
- -d xg-sh-1.tmp xg-sh-1.sh
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < xg-sh-1.tmp.po > xg-sh-1.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+ -d xg-sh-1.tmp xg-sh-1.sh || exit 1
+LC_ALL=C tr -d '\r' < xg-sh-1.tmp.po > xg-sh-1.po || exit 1
-tmpfiles="$tmpfiles xg-sh-1.ok"
cat <<\EOF > xg-sh-1.ok
msgid "depth_0_none_0_x"
msgstr ""
${DIFF} xg-sh-1.ok xg-sh-1.po
result=$?
-rm -fr $tmpfiles
-
exit $result