3 # This program tests the PERCENTILES subcommand of the FREQUENCIES cmd
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
48 activity="create prog"
49 cat > $TEMPDIR/percents.stat <<EOF
50 data list free /z x(f3.2) y(f3.0) d(a30).
64 frequencies z /statistics=all /percentiles = 5,10,30,90.
69 if [ $? -ne 0 ] ; then no_result ; fi
73 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/percents.stat
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="compare output"
77 diff -b -B $TEMPDIR/pspp.list - <<EOF
79 +-----------+--------+---------+--------+--------+--------+
80 | | | | | Valid | Cum |
81 |Value Label| Value |Frequency| Percent| Percent| Percent|
82 #===========#========#=========#========#========#========#
83 | | .01| 1| 10.0| 10.0| 10.0|
84 | | .02| 1| 10.0| 10.0| 20.0|
85 | | .03| 1| 10.0| 10.0| 30.0|
86 | | .04| 1| 10.0| 10.0| 40.0|
87 | | .05| 1| 10.0| 10.0| 50.0|
88 | | .06| 1| 10.0| 10.0| 60.0|
89 | | .07| 1| 10.0| 10.0| 70.0|
90 | | .08| 1| 10.0| 10.0| 80.0|
91 | | .09| 1| 10.0| 10.0| 90.0|
92 | | .10| 1| 10.0| 10.0| 100.0|
93 #===========#========#=========#========#========#========#
94 | Total| 10| 100.0| 100.0| |
95 +--------------------+---------+--------+--------+--------+
116 if [ $? -ne 0 ] ; then fail ; fi