From 2a655e8b3693e78d6be47d51d011de61a7189a3f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 4 Oct 2010 12:38:06 -0700 Subject: [PATCH] RENAME VARIABLES: Convert tests to Autotest framework. --- tests/automake.mk | 2 +- tests/command/rename.sh | 113 ------------------ tests/language/dictionary/rename-variables.at | 43 +++++++ 3 files changed, 44 insertions(+), 114 deletions(-) delete mode 100755 tests/command/rename.sh create mode 100644 tests/language/dictionary/rename-variables.at diff --git a/tests/automake.mk b/tests/automake.mk index 72395adb..bfd9b010 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/rename.sh \ tests/command/regression.sh \ tests/command/regression-qr.sh \ tests/command/reliability.sh \ @@ -365,6 +364,7 @@ TESTSUITE_AT = \ tests/language/dictionary/attributes.at \ tests/language/dictionary/missing-values.at \ tests/language/dictionary/mrsets.at \ + tests/language/dictionary/rename-variables.at \ tests/language/expressions/evaluate.at \ tests/language/lexer/variable-parser.at \ tests/language/stats/aggregate.at \ diff --git a/tests/command/rename.sh b/tests/command/rename.sh deleted file mode 100755 index cc7a36b2..00000000 --- a/tests/command/rename.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/sh - -# This program tests that the rename command works properly - -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 - -PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT - - -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 <