From b3b8cd820da3100f7ad474a5ab88e2737da18d1b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 12 Apr 2010 19:18:56 -0700 Subject: [PATCH] COMPUTE: Convert tests to use Autotest. --- tests/automake.mk | 5 +- tests/bugs/compute-fmt.sh | 78 ------------------------ tests/bugs/compute-lv.sh | 96 ----------------------------- tests/bugs/compute-sum.sh | 87 --------------------------- tests/bugs/computebug.sh | 94 ----------------------------- tests/language/xforms/compute.at | 100 +++++++++++++++++++++++++++++++ tests/testsuite.at | 1 + 7 files changed, 102 insertions(+), 359 deletions(-) delete mode 100755 tests/bugs/compute-fmt.sh delete mode 100755 tests/bugs/compute-lv.sh delete mode 100755 tests/bugs/compute-sum.sh delete mode 100755 tests/bugs/computebug.sh create mode 100644 tests/language/xforms/compute.at diff --git a/tests/automake.mk b/tests/automake.mk index b8e891e7..914ff86b 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -105,7 +105,6 @@ dist_TESTS = \ tests/bugs/big-input-2.sh \ tests/bugs/case-map.sh \ tests/bugs/comment-at-eof.sh \ - tests/bugs/compute-fmt.sh \ tests/bugs/compression.sh \ tests/bugs/curtailed.sh \ tests/bugs/data-crash.sh \ @@ -139,9 +138,6 @@ dist_TESTS = \ tests/bugs/unwritable-dir.sh \ tests/bugs/val-labs.sh \ tests/bugs/val-labs-trailing-slash.sh \ - tests/bugs/computebug.sh \ - tests/bugs/compute-lv.sh \ - tests/bugs/compute-sum.sh \ tests/bugs/print-crash.sh \ tests/bugs/keep-all.sh \ tests/data/datasheet-test.sh \ @@ -417,6 +413,7 @@ TESTSUITE_AT = \ tests/language/stats/autorecode.at \ tests/language/stats/crosstabs.at \ tests/language/stats/frequencies.at \ + tests/language/xforms/compute.at \ tests/language/xforms/recode.at \ tests/output/render.at TESTSUITE = $(srcdir)/tests/testsuite diff --git a/tests/bugs/compute-fmt.sh b/tests/bugs/compute-fmt.sh deleted file mode 100755 index 2417cca9..00000000 --- a/tests/bugs/compute-fmt.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -# This program tests for a bug which caused a crash after SAVE FILE -# was called on a COMPUTEd variable - - -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 - -# 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 program" -cat > $TESTFILE < $TESTFILE < compute-sum.stat < $TESTFILE <