3 # This program tests the Trimmed Mean calculation, in the case
4 # where the data is weighted towards the centre
6 TEMPDIR=/tmp/pspp-tst-$$
7 TESTFILE=$TEMPDIR/`basename $0`.sps
9 # ensure that top_builddir are absolute
10 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
11 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
12 top_builddir=`cd $top_builddir; pwd`
13 PSPP=$top_builddir/src/ui/terminal/pspp
15 # ensure that top_srcdir is absolute
16 top_srcdir=`cd $top_srcdir; pwd`
18 STAT_CONFIG_PATH=$top_srcdir/config
19 export STAT_CONFIG_PATH
27 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
28 echo "NOT cleaning $TEMPDIR"
64 activity="create program"
66 DATA LIST LIST /X * C *.
77 /STATISTICS=DESCRIPTIVES
80 if [ $? -ne 0 ] ; then no_result ; fi
83 activity="run program"
84 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
85 if [ $? -ne 0 ] ; then no_result ; fi
88 activity="compare results"
89 diff -c $TEMPDIR/pspp.csv - << EOF
90 Table: Reading free-form data from INLINE.
95 Table: Case Processing Summary
97 ,Valid,,Missing,,Total,
98 ,N,Percent,N,Percent,N,Percent
99 X,52.00,100%,.00,0%,52.00,100%
102 ,,,Statistic,Std. Error
104 ,95% Confidence Interval for Mean,Lower Bound,1.95,
106 ,5% Trimmed Mean,,2.00,
109 ,Std. Deviation,,.24,
113 ,Interquartile Range,,.00,
117 if [ $? -ne 0 ] ; then fail ; fi