3 # Tests the NTILE subcommand of the frequencies command
5 TEMPDIR=/tmp/pspp-tst-$$
7 # ensure that top_builddir are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
11 PSPP=$top_builddir/src/ui/terminal/pspp
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
58 activity="create program $i"
59 cat > $TEMPDIR/prog.sps <<EOF
60 DATA LIST LIST notable /x * .
71 /PERCENTILES = 0 25 33.333 50 66.666 75 100
74 if [ $? -ne 0 ] ; then no_result; fi
76 activity="run program $i"
77 $SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
78 if [ $? -ne 0 ] ; then no_result ; fi
80 activity="move output"
81 cp $TEMPDIR/pspp.list $TEMPDIR/list.ref
82 if [ $? -ne 0 ] ; then no_result ; fi
86 activity="create program $i"
87 cat > $TEMPDIR/prog.sps <<EOF
88 DATA LIST LIST notable /x * .
103 if [ $? -ne 0 ] ; then no_result; fi
105 activity="run program $i"
106 $SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
107 if [ $? -ne 0 ] ; then no_result ; fi
109 activity="compare output"
110 diff $TEMPDIR/pspp.list $TEMPDIR/list.ref
111 if [ $? -ne 0 ] ; then fail; fi