#! /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.
#
!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.
#
${DIFF} ma-s-1.ok ma-s-1.out
result=$?
-rm -fr $tmpfiles
-
exit $result