From e8fd580aad21c96e31bb39d60827b406c42e8db6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 8 Aug 2010 22:34:11 -0700 Subject: [PATCH] COUNT: Convert tests to use Autotest. --- tests/automake.mk | 2 +- tests/command/count.sh | 151 --------------------------------- tests/language/xforms/count.at | 69 +++++++++++++++ 3 files changed, 70 insertions(+), 152 deletions(-) delete mode 100755 tests/command/count.sh create mode 100644 tests/language/xforms/count.at diff --git a/tests/automake.mk b/tests/automake.mk index 98fafb739a..f64a66913e 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -11,7 +11,6 @@ TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT) dist_TESTS = \ tests/command/bignum.sh \ - tests/command/count.sh \ tests/command/correlation.sh \ tests/command/do-if.sh \ tests/command/do-repeat.sh \ @@ -433,6 +432,7 @@ TESTSUITE_AT = \ tests/language/stats/oneway.at \ tests/language/utilities/set.at \ tests/language/xforms/compute.at \ + tests/language/xforms/count.at \ tests/language/xforms/recode.at \ tests/math/moments.at \ tests/output/render.at \ diff --git a/tests/command/count.sh b/tests/command/count.sh deleted file mode 100755 index aafd59a3b1..0000000000 --- a/tests/command/count.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/sh - -# This program tests the count transformation - -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 - -LANG=C -export LANG - -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 File 1" -cat > $TESTFILE < $TESTFILE <