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
22 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
23 echo "NOT cleaning $TEMPDIR"
61 activity="create program $i"
62 cat > $TEMPDIR/prog.sps <<EOF
63 DATA LIST LIST notable /x * .
74 /PERCENTILES = 0 25 33.333 50 66.666 75 100
77 if [ $? -ne 0 ] ; then no_result; fi
79 activity="run program $i"
80 $SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
81 if [ $? -ne 0 ] ; then no_result ; fi
83 activity="move output"
84 cp $TEMPDIR/pspp.list $TEMPDIR/list.ref
85 if [ $? -ne 0 ] ; then no_result ; fi
89 activity="create program $i"
90 cat > $TEMPDIR/prog.sps <<EOF
91 DATA LIST LIST notable /x * .
106 if [ $? -ne 0 ] ; then no_result; fi
108 activity="run program $i"
109 $SUPERVISOR $PSPP --testing-mode $TEMPDIR/prog.sps
110 if [ $? -ne 0 ] ; then no_result ; fi
112 activity="compare output"
113 diff $TEMPDIR/pspp.list $TEMPDIR/list.ref
114 if [ $? -ne 0 ] ; then fail; fi