From e3a5ee371609abb70f2d3f1efa11bd5c7e10ef09 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 20 Mar 2005 22:17:30 +0000 Subject: [PATCH] Rewrite AGGREGATE test. --- tests/ChangeLog | 4 + tests/command/aggregate.sh | 189 ++++++++++++++++++++++++++++++------- 2 files changed, 161 insertions(+), 32 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 79c7c673..4d294bdf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Sun Mar 20 14:16:31 2005 Ben Pfaff + + * command/aggregate.sh: Rewrite. + Mon Mar 14 21:58:23 2005 Ben Pfaff * Makefile.am: (TESTS_ENVIRONMENT) Add PERL to the test diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh index 3904d034..108336d0 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,166 @@ 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 outfile=* /missing=columnwise /document /presorted/break=x /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 + +exit 0 pass; -- 2.30.2