3 # Tests calculation of percentiles with the
4 # COMPATIBLE algorithm set.
6 TEMPDIR=/tmp/pspp-tst-$$
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 export STAT_CONFIG_PATH=$top_srcdir/config
53 activity="create program $i"
54 cat > $TEMPDIR/prog.sps <<EOF
55 DATA LIST LIST notable /x * .
67 /PERCENTILES = 0 25 50 75 100
70 if [ $? -ne 0 ] ; then no_result; fi
72 activity="run program $i"
73 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/prog.sps
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="compare output $i"
77 diff -B -b $TEMPDIR/pspp.list - <<EOF
79 +-----------+--------+---------+--------+--------+--------+
80 | | | | | Valid | Cum |
81 |Value Label| Value |Frequency| Percent| Percent| Percent|
82 #===========#========#=========#========#========#========#
83 | | 1.00| 1| 20.0| 20.0| 20.0|
84 | | 2.00| 1| 20.0| 20.0| 40.0|
85 | | 3.00| 1| 20.0| 20.0| 60.0|
86 | | 4.00| 1| 20.0| 20.0| 80.0|
87 | | 5.00| 1| 20.0| 20.0| 100.0|
88 #===========#========#=========#========#========#========#
89 | Total| 5| 100.0| 100.0| |
90 +--------------------+---------+--------+--------+--------+
92 +-------------------+-----+
99 |Percentiles 0 |1.000|
104 +-------------------+-----+
106 if [ $? -ne 0 ] ; then fail ; fi