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
14 # ensure that top_srcdir is absolute
15 top_srcdir=`cd $top_srcdir; pwd`
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
42 activity="generate pspp syntax"
43 $PERL $top_srcdir/tests/formats/num-out.pl > num-out.pspp
44 if [ $? -ne 0 ] ; then no_result ; fi
47 activity="run program"
48 $SUPERVISOR $PSPP --testing-mode num-out.pspp
49 if [ $? -ne 0 ] ; then no_result ; fi
52 activity="inexactify results"
53 $top_builddir/tests/formats/inexactify < output.txt > output.inexact
54 if [ $? -ne 0 ] ; then no_result ; fi
57 activity="gunzip expected results"
58 gzip -cd < $top_srcdir/tests/formats/num-out.expected.cmp.gz > expected.txt.cmp
59 if [ $? -ne 0 ] ; then no_result ; fi
62 activity="decompress expected results"
63 $PERL $top_srcdir/tests/formats/num-out-decmp.pl < expected.txt.cmp > expected.txt
64 if [ $? -ne 0 ] ; then no_result ; fi
67 activity="inexactify expected results"
68 $top_builddir/tests/formats/inexactify < expected.txt > expected.inexact
69 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="compare output"
73 $PERL $top_srcdir/tests/formats/num-out-compare.pl \
74 $PSPP_NUM_OUT_COMPARE_FLAGS expected.inexact output.inexact
75 if [ $? -ne 0 ] ; then fail ; fi