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 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
51 activity="create program"
53 data list list /ID * ABC *.
63 t-test /testval=2.0 /var=abc.
65 if [ $? -ne 0 ] ; then no_result ; fi
68 activity="run program"
69 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
70 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="compare output"
73 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
74 diff -b $TEMPDIR/pspp.list - <<EOF
75 1.1 DATA LIST. Reading free-form data from the command file.
82 2.1 T-TEST. One-Sample Statistics
83 #===#=#====#==============#========#
84 # #N|Mean|Std. Deviation|SE. Mean#
85 #===#=#====#==============#========#
86 #ABC#6|3.00| .84| .342#
87 #===#=#====#==============#========#
88 2.2 T-TEST. One-Sample Test
89 #===#=====================================================#
90 # # Test Value = 2.000000 #
91 # #-----+--+---------------+---------------+------------#
93 # # | | | +-----+------#
94 # # t |df|Sig. (2-tailed)|Mean Difference|Lower| Upper#
95 #===#=====#==#===============#===============#=====#======#
96 #ABC#2.928| 5| .033| 1.000|.1220|1.8780#
97 #===#=====#==#===============#===============#=====#======#
99 if [ $? -ne 0 ] ; then fail ; fi