From: John Darrington Date: Tue, 16 Dec 2003 02:57:32 +0000 (+0000) Subject: Added tests for descriptives and flip X-Git-Tag: v0.4.0~449 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ee0b85d700d99fc3cba91c37da31e3d01ac0f47;p=pspp-builds.git Added tests for descriptives and flip --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 402a22ea..2d2cf71c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -9,6 +9,8 @@ TESTS = command/aggregate.sh \ command/beg-data.sh \ command/bignum.sh \ command/count.sh \ + command/descriptives.sh \ + command/flip.sh \ command/sort.sh \ bugs/double-frequency.sh \ bugs/html-frequency.sh diff --git a/tests/command/bignum.sh b/tests/command/bignum.sh new file mode 100755 index 00000000..17cc5519 --- /dev/null +++ b/tests/command/bignum.sh @@ -0,0 +1,156 @@ +#!/bin/sh + +# This program tests the use of big numbers + +TEMPDIR=/tmp/pspp-tst-$$ + +here=`pwd`; + +# ensure that top_srcdir is absolute +cd $top_srcdir; top_srcdir=`pwd` + +export STAT_CONFIG_PATH=$top_srcdir/config + + +cleanup() +{ + rm -rf $TEMPDIR +} + + +fail() +{ + echo $activity + echo FAILED + cleanup; + exit 1; +} + + +no_result() +{ + echo $activity + echo NO RESULT; + cleanup; + exit 2; +} + +pass() +{ + cleanup; + exit 0; +} + +mkdir -p $TEMPDIR + +cd $TEMPDIR + +activity="create data file" +cat > $TEMPDIR/bignum.data << wizzah +0 +0.1 +0.5 +0.8 +0.9 +0.999 +1 +2 +3 +4 +5 +12 +123 +1234 +12345 +123456 +1234567 +12345678 +123456789 +1234567890 +19999999999 +199999999999 +1234567890123 +19999999999999 +199999999999999 +1234567890123456 +19999999999999999 +123456789012345678 +1999999999999999999 +12345678901234567890 +199999999999999999999 +1234567890123456789012 +19999999999999999999999 +123456789012345678901234 +1999999999999999999999999 +12345678901234567890123456 +199999999999999999999999999 +1234567890123456789012345678 +19999999999999999999999999999 +123456789012345678901234567890 +1999999999999999999999999999999 +12345678901234567890123456789012 +199999999999999999999999999999999 +1234567890123456789012345678901234 +19999999999999999999999999999999999 +123456789012345678901234567890123456 +1999999999999999999999999999999999999 +12345678901234567890123456789012345678 +199999999999999999999999999999999999999 +1234567890123456789012345678901234567890 +1999999999999999999999999999999999999999 +1e40 +1.1e40 +1.5e40 +1e41 +1e50 +1e100 +1e150 +1e200 +1e250 +1e300 +1.79641e308 +wizzah +if [ $? -ne 0 ] ; then no_result ; fi + + +activity="create program" +cat > $TEMPDIR/prog.stat < $TEMPDIR/count.stat < $TEMPDIR/descript.stat < $TEMPDIR/flip.stat <