3 TEMPDIR=/tmp/pspp-tst-$$
5 trap 'cd /; rm -rf $TEMPDIR' 0
7 # ensure that top_builddir are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
11 PSPP=$top_builddir/src/ui/terminal/pspp
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
41 activity="generate pspp syntax"
42 $PERL $top_srcdir/tests/formats/num-out.pl > num-out.pspp
43 if [ $? -ne 0 ] ; then no_result ; fi
46 activity="run program"
47 $SUPERVISOR $PSPP --testing-mode num-out.pspp
48 if [ $? -ne 0 ] ; then no_result ; fi
51 activity="inexactify results"
52 $top_builddir/tests/formats/inexactify < output.txt > output.inexact
53 if [ $? -ne 0 ] ; then no_result ; fi
56 activity="gunzip expected results"
57 gzip -cd < $top_srcdir/tests/formats/num-out.expected.cmp.gz > expected.txt.cmp
58 if [ $? -ne 0 ] ; then no_result ; fi
61 activity="decompress expected results"
62 $PERL $top_srcdir/tests/formats/num-out-decmp.pl < expected.txt.cmp > expected.txt
63 if [ $? -ne 0 ] ; then no_result ; fi
66 activity="inexactify expected results"
67 $top_builddir/tests/formats/inexactify < expected.txt > expected.inexact
68 if [ $? -ne 0 ] ; then no_result ; fi
71 activity="compare output"
72 $PERL $top_srcdir/tests/formats/num-out-compare.pl \
73 $PSPP_NUM_OUT_COMPARE_FLAGS expected.inexact output.inexact
74 if [ $? -ne 0 ] ; then fail ; fi