From d737633d2bf0b60c2a46c6ade75773e5ccb16f2b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 12 Apr 2010 15:49:20 -0700 Subject: [PATCH] RECODE: Convert tests to use Autotest. --- tests/automake.mk | 3 +- tests/bugs/recode-copy-bug.sh | 140 ------- .../recode.sh => language/xforms/recode.at} | 359 ++++++++++-------- tests/testsuite.at | 1 + 4 files changed, 193 insertions(+), 310 deletions(-) delete mode 100755 tests/bugs/recode-copy-bug.sh rename tests/{xforms/recode.sh => language/xforms/recode.at} (63%) mode change 100755 => 100644 diff --git a/tests/automake.mk b/tests/automake.mk index e392270e..b8e891e7 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -139,7 +139,6 @@ dist_TESTS = \ tests/bugs/unwritable-dir.sh \ tests/bugs/val-labs.sh \ tests/bugs/val-labs-trailing-slash.sh \ - tests/bugs/recode-copy-bug.sh \ tests/bugs/computebug.sh \ tests/bugs/compute-lv.sh \ tests/bugs/compute-sum.sh \ @@ -148,7 +147,6 @@ dist_TESTS = \ tests/data/datasheet-test.sh \ tests/libpspp/sparse-xarray-test.sh \ tests/output/paper-size.sh \ - tests/xforms/recode.sh \ tests/stats/descript-basic.sh \ tests/stats/descript-missing.sh \ tests/stats/descript-mean-bug.sh \ @@ -419,6 +417,7 @@ TESTSUITE_AT = \ tests/language/stats/autorecode.at \ tests/language/stats/crosstabs.at \ tests/language/stats/frequencies.at \ + tests/language/xforms/recode.at \ tests/output/render.at TESTSUITE = $(srcdir)/tests/testsuite DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE) diff --git a/tests/bugs/recode-copy-bug.sh b/tests/bugs/recode-copy-bug.sh deleted file mode 100755 index 6e6ac06e..00000000 --- a/tests/bugs/recode-copy-bug.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh - -# This program tests .... - -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 -if [ $? -ne 0 ] ; then no_result ; fi - -activity="create syntax 1" -cat > recode-copy-bug-1.stat < recode-copy-bug-2.stat < $TESTFILE <