#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test that untranslated messages that are brought over from the .pot file
# get the right number of msgstrs.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mm-test17.po"
cat <<\EOF > mm-test17.po
# Irish translations.
msgid ""
msgstr ""
EOF
-tmpfiles="$tmpfiles mm-test17.pot"
cat <<\EOF > mm-test17.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
msgstr ""
EOF
-tmpfiles="$tmpfiles mm-test17.tmp.po mm-test17.new.po"
: ${MSGMERGE=msgmerge}
-${MSGMERGE} -q -o mm-test17.tmp.po mm-test17.po mm-test17.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mm-test17.tmp.po > mm-test17.new.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGMERGE} -q -o mm-test17.tmp.po mm-test17.po mm-test17.pot || exit 1
+LC_ALL=C tr -d '\r' < mm-test17.tmp.po > mm-test17.new.po || exit 1
-tmpfiles="$tmpfiles mm-test17.ok"
cat <<\EOF > mm-test17.ok
# Irish translations.
msgid ""
${DIFF} mm-test17.ok mm-test17.new.po
result=$?
-rm -fr $tmpfiles
-
exit $result