Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-scheme-2
index e2916a8..cc7b5bf 100755 (executable)
@@ -1,21 +1,15 @@
 #!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
 
 # Test Scheme support: strings outside any function call.
 
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-sc-2.scm"
 cat <<EOF > xg-sc-2.scm
 (define foo '("bar" "quux"))
 EOF
 
-tmpfiles="$tmpfiles xg-sc-2.po"
 : ${XGETTEXT=xgettext}
-${XGETTEXT} -k_ --omit-header --no-location --force-po -d xg-sc-2 xg-sc-2.scm
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -k_ --omit-header --no-location --force-po -d xg-sc-2 xg-sc-2.scm || exit 1
 
-tmpfiles="$tmpfiles xg-sc-2.ok"
 cat <<EOF > xg-sc-2.ok
 EOF
 
@@ -23,6 +17,4 @@ EOF
 ${DIFF} xg-sc-2.ok xg-sc-2.po
 result=$?
 
-rm -fr $tmpfiles
-
 exit $result