Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcomm-26
index 0e79f8a..dfb3ab9 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test msgcomm on PO files with previous msgids.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mcomm-test26.in1"
 cat <<\EOF > mcomm-test26.in1
 msgid ""
 msgstr ""
@@ -44,7 +41,6 @@ msgid "%s: invalid option -- %c\n"
 msgstr "%s: ungültige Option -- %c\n"
 EOF
 
-tmpfiles="$tmpfiles mcomm-test26.in2"
 cat <<\EOF > mcomm-test26.in2
 msgid ""
 msgstr ""
@@ -71,14 +67,10 @@ msgid "%s: illegal option -- %c\n"
 msgstr "%s: ungültige Optionen -- %c\n"
 EOF
 
-tmpfiles="$tmpfiles mcomm-test26.tmp mcomm-test26.out"
 : ${MSGCOMM=msgcomm}
-${MSGCOMM} -o mcomm-test26.tmp mcomm-test26.in1 mcomm-test26.in2
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mcomm-test26.tmp > mcomm-test26.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGCOMM} -o mcomm-test26.tmp mcomm-test26.in1 mcomm-test26.in2 || exit 1
+LC_ALL=C tr -d '\r' < mcomm-test26.tmp > mcomm-test26.out || exit 1
 
-tmpfiles="$tmpfiles mcomm-test26.ok"
 cat <<\EOF > mcomm-test26.ok
 msgid ""
 msgstr ""
@@ -109,6 +101,4 @@ EOF
 ${DIFF} mcomm-test26.ok mcomm-test26.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result