X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Faggregate.sh;h=9c7f4c12aeb8fa20f7c1b6dd20a4d2b1427b3423;hb=f62700038e9edd7d8002242015a900a15626bceb;hp=597217f83e751af01f899ae95264a79017f255b6;hpb=362ef6aa0dde26bc7ae7b2c042b47f96b8b1bca1;p=pspp diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh index 597217f83e..9c7f4c12ae 100755 --- a/tests/command/aggregate.sh +++ b/tests/command/aggregate.sh @@ -3,6 +3,8 @@ # This program tests the aggregate procedure TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/aggregate.pspp + here=`pwd`; @@ -10,10 +12,12 @@ here=`pwd`; cd $top_srcdir; top_srcdir=`pwd` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -45,43 +49,165 @@ mkdir -p $TEMPDIR cd $TEMPDIR -activity="program create" -cat > $TEMPDIR/test.sps << 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 < /tmp/foo +activity="expected output (itemwise missing) create" +cat > 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;