From 21d8a9525b894f09e1c8c7f0cd6eac07729a7ceb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 11 Oct 2010 22:35:09 -0700 Subject: [PATCH] tests: Convert test for vectors in expressions to Autotest framework. --- tests/automake.mk | 3 +- tests/expressions/vectors.sh | 107 ------------------------- tests/language/expressions/evaluate.at | 28 +++++++ 3 files changed, 29 insertions(+), 109 deletions(-) delete mode 100755 tests/expressions/vectors.sh diff --git a/tests/automake.mk b/tests/automake.mk index 45b6af4b..9f58af72 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -26,8 +26,7 @@ dist_TESTS = \ tests/formats/time-out.sh \ tests/formats/wkday-in.sh \ tests/formats/wkday-out.sh \ - tests/formats/360.sh \ - tests/expressions/vectors.sh + tests/formats/360.sh TESTS = $(dist_TESTS) $(nodist_TESTS) diff --git a/tests/expressions/vectors.sh b/tests/expressions/vectors.sh deleted file mode 100755 index 967dec59..00000000 --- a/tests/expressions/vectors.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/sh - -# This program tests use of vectors in expressions. - -TEMPDIR=/tmp/pspp-tst-$$ - -# ensure that top_srcdir and top_builddir are absolute -if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi -if [ -z "$top_builddir" ] ; then top_builddir=. ; fi -top_srcdir=`cd $top_srcdir; pwd` -top_builddir=`cd $top_builddir; pwd` -PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT - -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 program" -cat > $TEMPDIR/vectors.stat < $TEMPDIR/vectors.err 2> $TEMPDIR/vectors.out -if [ $? -ne 0 ] ; then fail ; fi - -activity="compare results" -diff -c $TEMPDIR/pspp.csv - <