3 # This program tests for a bug which caused CROSSTABS to crash in
6 TEMPDIR=/tmp/pspp-tst-$$
7 TESTFILE=$TEMPDIR/`basename $0`.sps
11 # ensure that top_srcdir is absolute
12 cd $top_srcdir; top_srcdir=`pwd`
14 STAT_CONFIG_PATH=$top_srcdir/config
15 export STAT_CONFIG_PATH
51 activity="create program"
53 DATA LIST LIST /A * B * X * Y * .
58 CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y.
60 if [ $? -ne 0 ] ; then no_result ; fi
62 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
63 if [ $? -ne 0 ] ; then no_result ; fi
66 diff -b -B -w $TEMPDIR/pspp.list - << EOF
67 1.1 DATA LIST. Reading free-form data from the command file.
77 2.1 CROSSTABS. Summary.
78 #===============#=====================================================#
80 # #-----------------+-----------------+-----------------#
81 # # Valid | Missing | Total #
82 # #--------+--------+--------+--------+--------+--------#
83 # # N| Percent| N| Percent| N| Percent#
84 #---------------#--------+--------+--------+--------+--------+--------#
85 #X * Y # 1| 100.0%| 0| 0.0%| 1| 100.0%#
86 #===============#========#========#========#========#========#========#
88 2.2 CROSSTABS. X by Y [count].
89 #===============#==============================================================#========#
91 # #--------+--------+--------+--------+--------+--------+--------+ #
92 # X# 1.00| 2.00| 3.00| 4.00| 5.00| 6.00| 7.00| Total #
93 #---------------#--------+--------+--------+--------+--------+--------+--------+--------#
94 # 1.00# .0| .0| .0| .0| .0| .0| .0| .0#
95 # 2.00# .0| .0| .0| .0| .0| .0| .0| .0#
96 # 3.00# .0| .0| .0| .0| .0| .0| .0| .0#
97 # 4.00# .0| .0| .0| .0| 1.0| .0| .0| 1.0#
98 # 5.00# .0| .0| .0| .0| .0| .0| .0| .0#
99 # 6.00# .0| .0| .0| .0| .0| .0| .0| .0#
100 # 7.00# .0| .0| .0| .0| .0| .0| .0| .0#
101 #Total # .0%| .0%| .0%| .0%| 1.0%| .0%| .0%| 1.0%#
102 #===============#========#========#========#========#========#========#========#========#
105 if [ $? -ne 0 ] ; then fail ; fi