From: Ben Pfaff Date: Thu, 5 May 2005 13:16:28 +0000 (+0000) Subject: Fix PR 12948. X-Git-Tag: v0.4.0~88 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=743a9ef8927b6b9347eafaa9e32caca1871a14c4;p=pspp-builds.git Fix PR 12948. --- diff --git a/tests/bugs/match-files-scratch.sh b/tests/bugs/match-files-scratch.sh new file mode 100755 index 00000000..afdea8a9 --- /dev/null +++ b/tests/bugs/match-files-scratch.sh @@ -0,0 +1,92 @@ +#!/bin/sh + +# This program tests for a bug which caused MATCH FILES to crash +# when used with scratch variables. + + +TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/`basename $0`.pspp + +here=`pwd`; + +# ensure that top_srcdir is absolute +cd $top_srcdir; top_srcdir=`pwd` + +export STAT_CONFIG_PATH=$top_srcdir/config + + +cleanup() +{ + rm -rf $TEMPDIR +} + + +fail() +{ + echo $activity + echo FAILED + cleanup; + exit 1; +} + + +no_result() +{ + echo $activity + echo NO RESULT; + cleanup; + exit 2; +} + +pass() +{ + cleanup; + exit 0; +} + +mkdir -p $TEMPDIR + +cd $TEMPDIR + +activity="create program" +cat > $TESTFILE <