#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test msgconv on a PO file with contexts.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mco-test5.po"
cat <<\EOF > mco-test5.po
msgid ""
msgstr ""
#~ msgstr "Enregistrer sous"
EOF
-tmpfiles="$tmpfiles mco-test5.tmp mco-test5.out"
: ${MSGCONV=msgconv}
-${MSGCONV} --to-code=UTF-8 -o mco-test5.tmp mco-test5.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mco-test5.tmp > mco-test5.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGCONV} --to-code=UTF-8 -o mco-test5.tmp mco-test5.po || exit 1
+LC_ALL=C tr -d '\r' < mco-test5.tmp > mco-test5.out || exit 1
-tmpfiles="$tmpfiles mco-test5.ok"
cat <<\EOF > mco-test5.ok
msgid ""
msgstr ""
${DIFF} mco-test5.ok mco-test5.out
result=$?
-rm -fr $tmpfiles
-
exit $result