Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgfmt-16
index 4404351..f2641f5 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test msgfmt on a PO file with previous msgids.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mf-16.po"
 cat <<\EOF > mf-16.po
 msgid ""
 msgstr ""
@@ -44,19 +41,13 @@ msgstr "Argumente fehlen."
 #~ msgstr "%s: ungültige Option -- %c\n"
 EOF
 
-tmpfiles="$tmpfiles mf-16.mo"
 : ${MSGFMT=msgfmt}
-${MSGFMT} -o mf-16.mo mf-16.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGFMT} -o mf-16.mo mf-16.po || exit 1
 
-tmpfiles="$tmpfiles mf-16.tmp mf-16.out"
 : ${MSGUNFMT=msgunfmt}
-${MSGUNFMT} -o mf-16.tmp mf-16.mo
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mf-16.tmp > mf-16.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGUNFMT} -o mf-16.tmp mf-16.mo || exit 1
+LC_ALL=C tr -d '\r' < mf-16.tmp > mf-16.out || exit 1
 
-tmpfiles="$tmpfiles mf-16.ok"
 cat <<\EOF > mf-16.ok
 msgid ""
 msgstr ""
@@ -72,6 +63,4 @@ EOF
 ${DIFF} mf-16.ok mf-16.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result