From 5aee303c40fc10d689756324133ed46de4fe62fa Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 29 Jul 2010 22:15:15 -0700 Subject: [PATCH] FLIP: Convert tests to use Autotest. --- tests/automake.mk | 2 +- tests/command/flip.sh | 144 ----------------------------------- tests/language/stats/flip.at | 78 +++++++++++++++++++ tests/testsuite.at | 1 + 4 files changed, 80 insertions(+), 145 deletions(-) delete mode 100755 tests/command/flip.sh create mode 100644 tests/language/stats/flip.at diff --git a/tests/automake.mk b/tests/automake.mk index d4db9224..a926b160 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -26,7 +26,6 @@ dist_TESTS = \ tests/command/file-label.sh \ tests/command/file-handle.sh \ tests/command/filter.sh \ - tests/command/flip.sh \ tests/command/get-data-txt.sh \ tests/command/get-data-txt-examples.sh \ tests/command/get-data-txt-importcases.sh \ @@ -430,6 +429,7 @@ TESTSUITE_AT = \ tests/language/stats/crosstabs.at \ tests/language/stats/descriptives.at \ tests/language/stats/factor.at \ + tests/language/stats/flip.at \ tests/language/stats/frequencies.at \ tests/language/xforms/compute.at \ tests/language/xforms/recode.at \ diff --git a/tests/command/flip.sh b/tests/command/flip.sh deleted file mode 100755 index 97ee5c00..00000000 --- a/tests/command/flip.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/sh - -# This program tests the flip 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 flip.stat" -cat > $TEMPDIR/flip.stat <