Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msggrep-9
index 8ededc2..9be93d3 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test interpretation of $ as end-of-line anchor.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mg-test9.po"
 cat <<\EOF > mg-test9.po
 # German translations for GNU gettext package.
 # Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
@@ -157,17 +154,14 @@ msgid "%s subprocess got fatal signal"
 msgstr "Subprozess %s hat ein fatales Signal erhalten"
 EOF
 
-tmpfiles="$tmpfiles mg-test9.tmp mg-test9.err mg-test9.out"
 : ${MSGGREP=msggrep}
 LC_MESSAGES=C LC_ALL= \
 ${MSGGREP} -K -e 'argument$' -o mg-test9.tmp mg-test9.po > mg-test9.err 2>&1
 result=$?
 cat mg-test9.err | grep -v 'warning: Locale charset' | grep -v '^ '
-test $result = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < mg-test9.tmp > mg-test9.out
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+test $result = 0 || { exit 1; }
+LC_ALL=C tr -d '\r' < mg-test9.tmp > mg-test9.out || exit 1
 
-tmpfiles="$tmpfiles mg-test9.ok"
 cat <<\EOF > mg-test9.ok
 # German translations for GNU gettext package.
 # Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
@@ -225,6 +219,4 @@ EOF
 ${DIFF} mg-test9.ok mg-test9.out
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result