X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Fcommand%2Faggregate.sh;h=fd14d66ddce3f762680c30f6882a4d328cec4272;hb=9074ccc083d5d68f0d3a2843106165a6d99ae1c6;hp=c03852ecd702d5bc05f3289f38cceb9f7c09b31f;hpb=a19e7749cdb8713316fde220f2fc9a5ad5dc79ed;p=pspp diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh index c03852ecd7..fd14d66ddc 100755 --- a/tests/command/aggregate.sh +++ b/tests/command/aggregate.sh @@ -3,7 +3,7 @@ # This program tests the aggregate procedure TEMPDIR=/tmp/pspp-tst-$$ -TESTFILE=$TEMPDIR/`basename $0`.sps +TESTFILE=$TEMPDIR/aggregate.pspp here=`pwd`; @@ -47,41 +47,165 @@ mkdir -p $TEMPDIR cd $TEMPDIR -activity="program create" -cat > $TESTFILE << EOF - -data list notable /x y 1-2. -begin data. -13 -27 -30 -12 -26 -11 -10 -28 -29 -14 -15 -end data. -sort cases by x. -aggregate /missing=columnwise /document /presorted/break=x(a) /z'label for z'=sum(y)/foo=nu. -list. +activity="data create" +cat > aggregate.data < agg-skel.pspp < agg-itemwise.out < agg-columnwise.out < $name.pspp + if [ $? -ne 0 ] ; then no_result ; fi + + activity="run $name.pspp" + $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $name.pspp >/dev/null 2>&1 + if [ $? -ne 0 ] ; then no_result ; fi + + activity="check $name output" + diff -b -w -B pspp.list agg-$missing.out + if [ $? -ne 0 ] ; then fail ; fi + done + done +done pass;