From d333d6f8945fd5d194f700a3b4dad3e4826efe29 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 2 Oct 2010 14:32:14 -0700 Subject: [PATCH] N OF CASES: Convert test to Autotest framework. --- tests/automake.mk | 1 - tests/command/n_of_cases.sh | 106 ------------------------------------ tests/language/command.at | 37 +++++++++++++ 3 files changed, 37 insertions(+), 107 deletions(-) delete mode 100755 tests/command/n_of_cases.sh diff --git a/tests/automake.mk b/tests/automake.mk index e02e090b..90db8c5b 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/n_of_cases.sh \ tests/command/npar-binomial.sh \ tests/command/npar-chisquare.sh \ tests/command/npar-wilcoxon.sh \ diff --git a/tests/command/n_of_cases.sh b/tests/command/n_of_cases.sh deleted file mode 100755 index 667162d6..00000000 --- a/tests/command/n_of_cases.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh - -# This program tests the N OF CASES command to make sure -# that it actually works. - -TEMPDIR=/tmp/pspp-tst-$$ -TESTFILE=$TEMPDIR/`basename $0`.sps - -# 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 - -cat > $TESTFILE <