Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / format-php-1
index 9efb3a5..642e660 100755 (executable)
@@ -1,11 +1,8 @@
 #! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test recognition of PHP format strings.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles f-ph-1.data"
 cat <<\EOF > f-ph-1.data
 # Valid: no argument
 "abc%%"
@@ -84,7 +81,6 @@ n=0
 while read comment; do
   read string
   n=`expr $n + 1`
-  tmpfiles="$tmpfiles f-ph-1-$n.in f-ph-1-$n.po"
   echo "<?= gettext(${string}) ?>" | sed -e 's/\$/\\\$/g' > f-ph-1-$n.in
   ${XGETTEXT} -L PHP -o f-ph-1-$n.po f-ph-1-$n.in || exit 1
   test -f f-ph-1-$n.po || exit 1
@@ -112,6 +108,4 @@ while read comment; do
   rm -f f-ph-1-$n.in f-ph-1-$n.po
 done < f-ph-1.data
 
-rm -fr $tmpfiles
-
 exit 0