Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-7
index 2d2b469..9a11f27 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Verify 'msgcat --sort-output'
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mcat-test7.in1"
 cat <<EOF > mcat-test7.in1
 #: clients/inst_language.ycp:119
 msgid "two"
@@ -18,15 +15,11 @@ msgstr ""
 "1"
 EOF
 
-tmpfiles="$tmpfiles mcat-test7.tmp mcat-test7.out"
 rm -f mcat-test7.tmp
 : ${MSGCAT=msgcat}
-${MSGCAT} --sort-output -o mcat-test7.tmp mcat-test7.in1
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mcat-test7.tmp > mcat-test7.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGCAT} --sort-output -o mcat-test7.tmp mcat-test7.in1 || exit 1
+LC_ALL=C tr -d '\r' < mcat-test7.tmp > mcat-test7.out || exit 1
 
-tmpfiles="$tmpfiles mcat-test7.ok"
 cat << EOF > mcat-test7.ok
 #: clients/inst_language.ycp:108
 msgid "one"
@@ -41,6 +34,4 @@ EOF
 ${DIFF} mcat-test7.ok mcat-test7.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result