Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-10
index e8ef11f..eb1a429 100755 (executable)
@@ -1,12 +1,9 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test merging of a message which has plural forms in ref.pot but not
 # in def.po.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mm-test10.po"
 cat <<EOF > mm-test10.po
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Free Software Foundation, Inc.
@@ -29,7 +26,6 @@ msgid "%d error"
 msgstr "%d erreur"
 EOF
 
-tmpfiles="$tmpfiles mm-test10.pot"
 cat <<EOF > mm-test10.pot
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Free Software Foundation, Inc.
@@ -54,14 +50,10 @@ msgstr[0] ""
 msgstr[1] ""
 EOF
 
-tmpfiles="$tmpfiles mm-test10.tmp mm-test10.out"
 : ${MSGMERGE=msgmerge}
-${MSGMERGE} -q -o mm-test10.tmp mm-test10.po mm-test10.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mm-test10.tmp > mm-test10.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGMERGE} -q -o mm-test10.tmp mm-test10.po mm-test10.pot || exit 1
+LC_ALL=C tr -d '\r' < mm-test10.tmp > mm-test10.out || exit 1
 
-tmpfiles="$tmpfiles mm-test10.ok"
 cat <<EOF > mm-test10.ok
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Free Software Foundation, Inc.
@@ -91,6 +83,4 @@ EOF
 ${DIFF} mm-test10.ok mm-test10.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result