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="write pspp syntax"
42 cat > binhex-out.pspp <<EOF
117 file handle output/name='binhex.out'/mode=image/lrecl=256.
118 write outfile=output/
119 x(p1.0) x(p2.0) x(p3.0) x(p4.0) /* 000
120 x(p2.1) x(p3.1) x(p4.1) /* 00a
121 x(p3.2) x(p4.2) /* 013
123 x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0) /* 01e
124 x(pk2.1) x(pk3.1) x(pk4.1) /* 028
125 x(pk3.2) x(pk4.2) /* 031
127 x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0) /* 03c
128 x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1) /* 046
129 x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2) /* 050
130 x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3) /* 05a
131 x(ib2.4) x(ib3.4) x(ib4.4) /* 064
132 x(ib2.5) x(ib3.5) x(ib4.5) /* 06d
133 x(ib3.6) x(ib4.6) /* 076
134 x(ib3.7) x(ib4.7) /* 07d
135 x(ib3.8) x(ib4.8) /* 084
138 x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093
139 x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d
140 x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7
141 x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1
142 x(pib2.4) x(pib3.4) x(pib4.4) /* 0bb
143 x(pib2.5) x(pib3.5) x(pib4.5) /* 0c4
144 x(pib3.6) x(pib4.6) /* 0cd
145 x(pib3.7) x(pib4.7) /* 0d4
146 x(pib3.8) x(pib4.8) /* 0db
149 x(pibhex2) x(pibhex4) /* 0ea
150 x(pibhex6) x(pibhex8). /* 0f0
154 if [ $? -ne 0 ] ; then no_result ; fi
156 activity="run program"
157 $SUPERVISOR $PSPP --testing-mode binhex-out.pspp
158 if [ $? -ne 0 ] ; then no_result ; fi
160 activity="gunzip expected results"
161 gzip -cd < $top_srcdir/tests/formats/binhex-out.expected.gz > expected.out
162 if [ $? -ne 0 ] ; then no_result ; fi
164 activity="compare output"
165 cmp expected.out binhex.out
166 if [ $? -ne 0 ] ; then fail ; fi