Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgattrib-properties-1
index fc42200..4a5c523 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test --translated option with Java .properties syntax.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles ma-s-1.properties"
 cat <<\EOF > ma-s-1.properties
 # HEADER.
 #
@@ -32,14 +29,10 @@ with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht
 !They\ warn\ you\ and\ darn\ you=
 EOF
 
-tmpfiles="$tmpfiles ma-s-1.tmp ma-s-1.out"
 : ${MSGATTRIB=msgattrib}
-${MSGATTRIB} --translated --properties-input --properties-output -o ma-s-1.tmp ma-s-1.properties
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < ma-s-1.tmp > ma-s-1.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGATTRIB} --translated --properties-input --properties-output -o ma-s-1.tmp ma-s-1.properties || exit 1
+LC_ALL=C tr -d '\r' < ma-s-1.tmp > ma-s-1.out || exit 1
 
-tmpfiles="$tmpfiles ma-s-1.ok"
 cat <<\EOF > ma-s-1.ok
 # HEADER.
 #
@@ -57,6 +50,4 @@ EOF
 ${DIFF} ma-s-1.ok ma-s-1.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result