Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgfmt-7
index 0c7d96a..f07a6b0 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Check for duplicates with identical translations
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles mf-test7.in1"
 cat <<EOF > mf-test7.in1
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR Free Software Foundation, Inc.
@@ -26,13 +23,11 @@ msgid "3" msgstr "3"
 msgid "3" msgstr "3"
 EOF
 
-tmpfiles="$tmpfiles mf-test7.err"
 : ${MSGFMT=msgfmt}
 LC_MESSAGES=C LC_ALL= \
 ${MSGFMT} --verbose --check mf-test7.in1 -o /dev/null \
     2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgfmt\.exe|msgfmt|' -e 's|^msgfmt\.exe|msgfmt|' | LC_ALL=C tr -d '\r' > mf-test7.err
 
-tmpfiles="$tmpfiles mf-test7.ok"
 cat << EOF > mf-test7.ok
 mf-test7.in1:17: duplicate message definition...
 mf-test7.in1:16: ...this is the location of the first definition
@@ -43,6 +38,4 @@ EOF
 ${DIFF} mf-test7.ok mf-test7.err
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result