Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-6
index e8ffc71..1d07320 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test non-ASCII character at the end of msgstr. (Triggered a glibc-2.1 bug.)
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mm-test6.in1.po mm-test6.in2.po"
 cat <<\EOF > mm-test6.in1.po
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Free Software Foundation, Inc.
@@ -56,15 +53,11 @@ msgid "was correct."
 msgstr ""
 EOF
 
-tmpfiles="$tmpfiles mm-test6.tmp mm-test6.out"
 : ${MSGMERGE=msgmerge}
 LC_MESSAGES=C LC_ALL= \
-${MSGMERGE} -q -o mm-test6.tmp mm-test6.in1.po mm-test6.in2.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mm-test6.tmp > mm-test6.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGMERGE} -q -o mm-test6.tmp mm-test6.in1.po mm-test6.in2.po || exit 1
+LC_ALL=C tr -d '\r' < mm-test6.tmp > mm-test6.out || exit 1
 
-tmpfiles="$tmpfiles mm-test6.ok"
 cat <<\EOF > mm-test6.ok
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Free Software Foundation, Inc.
@@ -99,6 +92,4 @@ EOF
 ${DIFF} mm-test6.ok mm-test6.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result