From: Ben Pfaff Date: Sat, 25 Sep 2010 23:13:04 +0000 (-0700) Subject: tests: Convert bignum.sh test to use Autotest. X-Git-Tag: v0.7.6~161 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41692a68715c555e7206e690553f006ff330535d;p=pspp-builds.git tests: Convert bignum.sh test to use Autotest. --- diff --git a/tests/automake.mk b/tests/automake.mk index 772491df..77de4a37 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -10,7 +10,6 @@ TESTS_ENVIRONMENT += LC_ALL=C TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT) dist_TESTS = \ - tests/command/bignum.sh \ tests/command/correlation.sh \ tests/command/do-if.sh \ tests/command/do-repeat.sh \ @@ -396,6 +395,7 @@ EXTRA_DIST += \ TESTSUITE_AT = \ tests/data/calendar.at \ + tests/data/data-in.at \ tests/language/data-io/add-files.at \ tests/language/data-io/data-list.at \ tests/language/data-io/data-reader.at \ diff --git a/tests/command/bignum.sh b/tests/command/bignum.sh deleted file mode 100755 index d1242692..00000000 --- a/tests/command/bignum.sh +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/sh - -# This program tests the use of big numbers - -TEMPDIR=/tmp/pspp-tst-$$ -TESTFILE=$TEMPDIR/`basename $0`.sps - -# ensure that top_builddir are absolute -if [ -z "$top_builddir" ] ; then top_builddir=. ; fi -if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi -top_builddir=`cd $top_builddir; pwd` -PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT - -# ensure that top_srcdir is absolute -top_srcdir=`cd $top_srcdir; pwd` - -STAT_CONFIG_PATH=$top_srcdir/config -export STAT_CONFIG_PATH - - -cleanup() -{ - if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then - echo "NOT cleaning $TEMPDIR" - return ; - fi - cd / - 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 > $TESTFILE <