3 # This program tests for a bug which didn't properly
4 # compare string values.
6 TEMPDIR=/tmp/pspp-tst-$$
7 TESTFILE=$TEMPDIR/`basename $0`.sps
9 # ensure that top_srcdir and top_builddir are absolute
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
12 top_srcdir=`cd $top_srcdir; pwd`
13 top_builddir=`cd $top_builddir; pwd`
15 PSPP=$top_builddir/src/ui/terminal/pspp
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
26 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
27 echo "NOT cleaning $TEMPDIR"
61 cat >> $TESTFILE <<EOF
62 data list list /x * gv (a8).
74 t-test group=gv('One', 'Two')
77 if [ $? -ne 0 ] ; then no_result ; fi
80 activity="run program"
81 $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
82 if [ $? -ne 0 ] ; then no_result ; fi
85 activity="compare output"
86 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
87 diff -b $TEMPDIR/pspp.list - << EOF
88 1.1 DATA LIST. Reading free-form data from INLINE.
95 2.1 T-TEST. Group Statistics
96 #==========#=#====#==============#========#
97 # gv |N|Mean|Std. Deviation|SE. Mean#
98 #==========#=#====#==============#========#
99 #x One |5|2.60| .548| .245#
100 # Two |3|3.50| .500| .289#
101 #==========#=#====#==============#========#
102 2.2 T-TEST. Independent Samples Test
103 #============================#==========#===============================================================================#
104 # # Levene's | t-test for Equality of Means #
105 # #-----+----+------+-----+---------------+---------------+---------------------+------------#
106 # # | | | | | | | 95% #
107 # # | | | | | | +------+-----#
108 # # F |Sig.| t | df |Sig. (2-tailed)|Mean Difference|Std. Error Difference| Lower|Upper#
109 #============================#=====#====#======#=====#===============#===============#=====================#======#=====#
110 #xEqual variances assumed #1.127|.329|-2.315| 6| .060| -.900| .379|-1.826| .026#
111 # Equal variances not assumed# | |-2.377|4.699| .067| -.900| .379|-1.892| .092#
112 #============================#=====#====#======#=====#===============#===============#=====================#======#=====#
114 if [ $? -ne 0 ] ; then fail ; fi