Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-16
index e5e5900..ed726c2 100755 (executable)
@@ -1,12 +1,9 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test non-ASCII msgids when the PO file and the POT file are in different
 # encodings.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mm-test16.po"
 cat <<\EOF > mm-test16.po
 msgid ""
 msgstr ""
@@ -31,7 +28,6 @@ msgid "error %1."
 msgstr "b³±d %1."
 EOF
 
-tmpfiles="$tmpfiles mm-test16.pot"
 cat <<EOF > mm-test16.pot
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Yoyodyne, Inc.
@@ -60,14 +56,10 @@ msgid "error %1."
 msgstr ""
 EOF
 
-tmpfiles="$tmpfiles mm-test16.tmp.po mm-test16.new.po"
 : ${MSGMERGE=msgmerge}
-${MSGMERGE} -q -o mm-test16.tmp.po mm-test16.po mm-test16.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mm-test16.tmp.po > mm-test16.new.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGMERGE} -q -o mm-test16.tmp.po mm-test16.po mm-test16.pot || exit 1
+LC_ALL=C tr -d '\r' < mm-test16.tmp.po > mm-test16.new.po || exit 1
 
-tmpfiles="$tmpfiles mm-test16.ok"
 cat <<\EOF > mm-test16.ok
 msgid ""
 msgstr ""
@@ -97,6 +89,4 @@ EOF
 ${DIFF} mm-test16.ok mm-test16.new.po
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result