3 # This program tests the PERCENTILES subcommand of the EXAMINE command.
4 # In particular it tests that it behaves properly when there are only
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_builddir are absolute
11 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
12 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
13 top_builddir=`cd $top_builddir; pwd`
14 PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT
16 # ensure that top_srcdir is absolute
17 top_srcdir=`cd $top_srcdir; pwd`
19 STAT_CONFIG_PATH=$top_srcdir/config
20 export STAT_CONFIG_PATH
28 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
29 echo "NOT cleaning $TEMPDIR"
64 activity="create program"
74 /PERCENTILES=HAVERAGE.
77 /PERCENTILES=WAVERAGE.
83 /PERCENTILES=EMPIRICAL.
86 /PERCENTILES=AEMPIRICAL.
88 if [ $? -ne 0 ] ; then no_result ; fi
90 activity="run program"
91 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
92 if [ $? -ne 0 ] ; then no_result ; fi
95 activity="compare results"
96 diff -c $TEMPDIR/pspp.csv - << EOF
97 Table: Reading free-form data from INLINE.
101 Table: Case Processing Summary
103 ,Valid,,Missing,,Total,
104 ,N,Percent,N,Percent,N,Percent
109 ,,5,10,25,50,75,90,95
110 X,HAverage,.40,.80,2.00,5.00,8.00,8.00,8.00
111 ,Tukey's Hinges,,,3.50,5.00,6.50,,
113 Table: Case Processing Summary
115 ,Valid,,Missing,,Total,
116 ,N,Percent,N,Percent,N,Percent
121 ,,5,10,25,50,75,90,95
122 X,Weighted Average,.30,.60,1.50,3.50,5.75,7.10,7.55
123 ,Tukey's Hinges,,,3.50,5.00,6.50,,
125 Table: Case Processing Summary
127 ,Valid,,Missing,,Total,
128 ,N,Percent,N,Percent,N,Percent
133 ,,5,10,25,50,75,90,95
134 X,Rounded,.00,.00,2.00,5.00,5.00,8.00,8.00
135 ,Tukey's Hinges,,,3.50,5.00,6.50,,
137 Table: Case Processing Summary
139 ,Valid,,Missing,,Total,
140 ,N,Percent,N,Percent,N,Percent
145 ,,5,10,25,50,75,90,95
146 X,Empirical,2.00,2.00,2.00,5.00,8.00,8.00,8.00
147 ,Tukey's Hinges,,,3.50,5.00,6.50,,
149 Table: Case Processing Summary
151 ,Valid,,Missing,,Total,
152 ,N,Percent,N,Percent,N,Percent
157 ,,5,10,25,50,75,90,95
158 X,Empirical with averaging,2.00,2.00,2.00,5.00,8.00,8.00,8.00
159 ,Tukey's Hinges,,,3.50,5.00,6.50,,
161 if [ $? -ne 0 ] ; then fail ; fi