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
12 # ensure that top_srcdir is absolute
13 top_srcdir=`cd $top_srcdir; pwd`
15 STAT_CONFIG_PATH=$top_srcdir/config
16 export STAT_CONFIG_PATH
53 activity="generate data input file"
54 $PERL -e 'print pack "n", $_ foreach 0...65535' > ib-in.data
56 activity="write pspp syntax"
57 cat > ib-in.pspp <<'EOF'
62 FILE HANDLE data/NAME='ib-in.data'/MODE=IMAGE/LRECL=2.
63 DATA LIST FILE=data/ib 1-2 (IB) pib 1-2 (PIB) pibhex 1-2 (PIBHEX).
64 COMPUTE x=$CASENUM - 1.
65 PRINT OUTFILE='ib-in.out'/x (PIBHEX4) ' ' ib pib pibhex.
68 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="run program"
71 $SUPERVISOR $PSPP --testing-mode ib-in.pspp
72 if [ $? -ne 0 ] ; then no_result ; fi
74 activity="gunzip expected results"
75 gzip -cd < $top_srcdir/tests/formats/ib-in.expected.cmp.gz > ib-in.expected.cmp
76 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="decompress expected results"
79 $PERL -pe "printf ' %04X ', $.-1" < ib-in.expected.cmp > ib-in.expected
80 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="compare output"
83 diff -u ib-in.expected ib-in.out
84 if [ $? -ne 0 ] ; then fail ; fi