Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-15
index a743e1c..a7a80aa 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test pseudo-comments containing filenames that start with a digit.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mm-test15.pot mm-test15.po"
 cat <<\EOF > mm-test15.pot
 msgid ""
 msgstr ""
@@ -29,14 +26,10 @@ msgid "invalid argument `%s' for `%s'"
 msgstr ""
 EOF
 
-tmpfiles="$tmpfiles mm-test15.tmp mm-test15.out"
 : ${MSGMERGE=msgmerge}
-${MSGMERGE} -q -o mm-test15.tmp mm-test15.pot mm-test15.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mm-test15.tmp > mm-test15.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGMERGE} -q -o mm-test15.tmp mm-test15.pot mm-test15.po || exit 1
+LC_ALL=C tr -d '\r' < mm-test15.tmp > mm-test15.out || exit 1
 
-tmpfiles="$tmpfiles mm-test15.ok"
 cat <<\EOF > mm-test15.ok
 msgid ""
 msgstr ""
@@ -57,6 +50,4 @@ EOF
 ${DIFF} mm-test15.ok mm-test15.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result