# where the data is weighted towards the centre
TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
here=`pwd`;
# ensure that top_srcdir is absolute
cd $top_srcdir; top_srcdir=`pwd`
-export STAT_CONFIG_PATH=$top_srcdir/config
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
cleanup()
{
+ cd /
rm -rf $TEMPDIR
}
activity="create program"
-cat > $TEMPDIR/out.stat <<EOF
-DATA LIST LIST /x * c *.
+cat > $TESTFILE <<EOF
+DATA LIST LIST /X * C *.
BEGIN DATA.
1 1
2 49
activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare results"
-diff $TEMPDIR/pspp.list - << EOF
+perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
+diff -b $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
1.1 DATA LIST. Reading free-form data from the command file.
+--------+------+
|Variable|Format|
# 95% Confidence Interval for MeanLower Bound# 2.021 | #
# Upper Bound# 2.017 | #
# 5% Trimmed Mean # 2.00 | #
-# Median # | #
+# Median # 2.00 | #
# Variance # .058 | #
# Std. Deviation # .242 | #
# Minimum # 1.000 | #
# Maximum # 3.000 | #
# Range # 2.000 | #
-# Interquartile Range # | #
+# Interquartile Range # .00 | #
# Skewness # 1.194 | .330 #
# Kurtosis # 15.732 | .650 #
#============================================#=========#==========#