3 TEMPDIR=/tmp/pspp-tst-$$
5 # ensure that top_builddir are absolute
6 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
7 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
8 top_builddir=`cd $top_builddir; pwd`
9 PSPP=$top_builddir/src/ui/terminal/pspp
11 # ensure that top_srcdir is absolute
12 top_srcdir=`cd $top_srcdir; pwd`
14 STAT_CONFIG_PATH=$top_srcdir/config
15 export STAT_CONFIG_PATH
52 activity="generate data input file"
53 $PERL -e 'print pack "n", $_ foreach 0...65535' > legacy-in.data
55 activity="write pspp syntax"
56 cat > legacy-in.pspp <<'EOF'
60 FILE HANDLE data/NAME='legacy-in.data'/MODE=IMAGE/LRECL=2.
61 DATA LIST FILE=data/n 1-2 (N) z 1-2 (z).
62 COMPUTE x=$CASENUM - 1.
63 PRINT OUTFILE='legacy-in.out'/x (PIBHEX4) ' ' N Z.
66 if [ $? -ne 0 ] ; then no_result ; fi
68 activity="run program"
69 $SUPERVISOR $PSPP --testing-mode legacy-in.pspp
70 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="gunzip expected results"
73 gzip -cd < $top_srcdir/tests/formats/legacy-in.expected.cmp.gz > legacy-in.expected.cmp
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="decompress expected results"
77 $PERL -pe "printf ' %04X ', $.-1" < legacy-in.expected.cmp > legacy-in.expected
78 if [ $? -ne 0 ] ; then no_result ; fi
80 activity="compare output"
81 diff -u legacy-in.expected legacy-in.out
82 if [ $? -ne 0 ] ; then fail ; fi