Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgattrib-16
index ff8dfdc..72fefd1 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test msgattrib on a PO file with previous msgids.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles ma-test16.po"
 cat <<\EOF > ma-test16.po
 msgid ""
 msgstr ""
@@ -44,14 +41,10 @@ msgstr "Argumente fehlen."
 #~ msgstr "%s: ungültige Option -- %c\n"
 EOF
 
-tmpfiles="$tmpfiles ma-test16.tmp ma-test16.out"
 : ${MSGATTRIB=msgattrib}
-${MSGATTRIB} --fuzzy -o ma-test16.tmp ma-test16.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < ma-test16.tmp > ma-test16.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGATTRIB} --fuzzy -o ma-test16.tmp ma-test16.po || exit 1
+LC_ALL=C tr -d '\r' < ma-test16.tmp > ma-test16.out || exit 1
 
-tmpfiles="$tmpfiles ma-test16.ok"
 cat <<\EOF > ma-test16.ok
 msgid ""
 msgstr ""
@@ -82,6 +75,4 @@ EOF
 ${DIFF} ma-test16.ok ma-test16.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result