Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgconv-5
index 3850c43..800805f 100755 (executable)
@@ -1,11 +1,8 @@
 #! /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 ""
@@ -51,14 +48,10 @@ msgstr "photocopieur"
 #~ 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 ""
@@ -108,6 +101,4 @@ EOF
 ${DIFF} mco-test5.ok mco-test5.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result