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$EXEEXT
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"
62 cat >> $TESTFILE <<EOF
63 data list list /x * gv (a8).
75 t-test group=gv('One', 'Two')
78 if [ $? -ne 0 ] ; then no_result ; fi
81 activity="run program"
82 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
83 if [ $? -ne 0 ] ; then no_result ; fi
86 activity="compare output"
87 diff -c $TEMPDIR/pspp.csv - << EOF
88 Table: Reading free-form data from INLINE.
93 Table: Group Statistics
94 ,gv,N,Mean,Std. Deviation,S.E. Mean
98 Table: Independent Samples Test
99 ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,,
100 ,,,,,,,,,95% Confidence Interval of the Difference,
101 ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper
102 x,Equal variances assumed,1.13,.33,-2.32,6.00,.06,-.90,.38,-1.83,.03
103 ,Equal variances not assumed,,,-2.38,4.70,.07,-.90,.38,-1.89,.09
105 if [ $? -ne 0 ] ; then fail ; fi