3 # This program tests that the T-TEST /TESTVAL command works OK
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 export STAT_CONFIG_PATH=$top_srcdir/config
49 activity="create program"
51 data list list /id * abc *.
61 t-test /testval=2.0 /var=abc.
63 if [ $? -ne 0 ] ; then no_result ; fi
66 activity="run program"
67 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
68 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="compare output"
71 diff -B -b $TEMPDIR/pspp.list - <<EOF
72 1.1 DATA LIST. Reading free-form data from the command file.
80 2.1 T-TEST. One-Sample Statistics
81 #===#=#====#==============#========#
82 # #N|Mean|Std. Deviation|SE. Mean#
83 #===#=#====#==============#========#
84 #ABC#6|3.00| .84| .342#
85 #===#=#====#==============#========#
87 2.2 T-TEST. One-Sample Test
88 #===#=====================================================#
89 # # Test Value = 2.000000 #
90 # #-----+--+---------------+---------------+------------#
92 # # | | | +-----+------#
93 # # t |df|Sig. (2-tailed)|Mean Difference|Lower| Upper#
94 #===#=====#==#===============#===============#=====#======#
95 #ABC#2.928| 5| .033| 1.000|.1220|1.8780#
96 #===#=====#==#===============#===============#=====#======#
98 if [ $? -ne 0 ] ; then fail ; fi