#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test msgfmt on a PO file with previous msgids.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mf-16.po"
cat <<\EOF > mf-16.po
msgid ""
msgstr ""
#~ msgstr "%s: ungültige Option -- %c\n"
EOF
-tmpfiles="$tmpfiles mf-16.mo"
: ${MSGFMT=msgfmt}
-${MSGFMT} -o mf-16.mo mf-16.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGFMT} -o mf-16.mo mf-16.po || exit 1
-tmpfiles="$tmpfiles mf-16.tmp mf-16.out"
: ${MSGUNFMT=msgunfmt}
-${MSGUNFMT} -o mf-16.tmp mf-16.mo
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mf-16.tmp > mf-16.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGUNFMT} -o mf-16.tmp mf-16.mo || exit 1
+LC_ALL=C tr -d '\r' < mf-16.tmp > mf-16.out || exit 1
-tmpfiles="$tmpfiles mf-16.ok"
cat <<\EOF > mf-16.ok
msgid ""
msgstr ""
${DIFF} mf-16.ok mf-16.out
result=$?
-rm -fr $tmpfiles
-
exit $result