Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-17
index 5935688..40bc785 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test msgcat with --width option. Check that format strings are not broken.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mcat-test17.in"
 cat <<\EOF > mcat-test17.in
 msgid ""
 msgstr ""
@@ -21,15 +18,11 @@ msgid "write error of a big result on a too small disk% s% s"
 msgstr "Fehler beim Schreiben eines großen Ergebnisses auf eine zu kleine Platte% s% smit der jederzeitigen Möglichkeit eines Fehlers in jedem Moment und an jeder Stelle"
 EOF
 
-tmpfiles="$tmpfiles mcat-test17.tmp mcat-test17.out"
 rm -f mcat-test17.tmp
 : ${MSGCAT=msgcat}
-${MSGCAT} -o mcat-test17.tmp --width=80 mcat-test17.in
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mcat-test17.tmp > mcat-test17.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGCAT} -o mcat-test17.tmp --width=80 mcat-test17.in || exit 1
+LC_ALL=C tr -d '\r' < mcat-test17.tmp > mcat-test17.out || exit 1
 
-tmpfiles="$tmpfiles mcat-test17.ok"
 cat <<\EOF > mcat-test17.ok
 msgid ""
 msgstr ""
@@ -55,6 +48,4 @@ EOF
 ${DIFF} mcat-test17.ok mcat-test17.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result