From 52537fd5a00b0756e274cd0e2e1fdf9aca7cccf5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 9 Oct 2010 17:28:54 -0700 Subject: [PATCH] VECTOR: Convert tests to Autotest framework. --- tests/automake.mk | 2 +- tests/command/vector.sh | 142 ---------------------------- tests/language/dictionary/vector.at | 78 +++++++++++++++ 3 files changed, 79 insertions(+), 143 deletions(-) delete mode 100755 tests/command/vector.sh create mode 100644 tests/language/dictionary/vector.at diff --git a/tests/automake.mk b/tests/automake.mk index e614c1bd..7ee732cb 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/vector.sh \ tests/command/very-long-strings.sh \ tests/command/weight.sh \ tests/formats/bcd-in.sh \ @@ -337,6 +336,7 @@ TESTSUITE_AT = \ tests/language/dictionary/split-file.at \ tests/language/dictionary/sys-file-info.at \ tests/language/dictionary/variable-display.at \ + tests/language/dictionary/vector.at \ tests/language/expressions/evaluate.at \ tests/language/lexer/variable-parser.at \ tests/language/stats/aggregate.at \ diff --git a/tests/command/vector.sh b/tests/command/vector.sh deleted file mode 100755 index c5d41841..00000000 --- a/tests/command/vector.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh - -# This program tests the VECTOR command - -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 prog" -cat > $TEMPDIR/vector.stat <