From 0ba9dec55a92bff5e3b3ded7506a4bd5aff5ee7c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 3 Oct 2010 05:42:58 -0700 Subject: [PATCH] NPAR TESTS: Convert SIGN test to Autotest framework. --- tests/automake.mk | 1 - tests/command/npar-sign.sh | 109 ----------------------------------- tests/language/stats/npar.at | 41 +++++++++++++ 3 files changed, 41 insertions(+), 110 deletions(-) delete mode 100755 tests/command/npar-sign.sh diff --git a/tests/automake.mk b/tests/automake.mk index 5f28780b..95241108 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/npar-sign.sh \ tests/command/permissions.sh \ tests/command/print.sh \ tests/command/print-strings.sh \ diff --git a/tests/command/npar-sign.sh b/tests/command/npar-sign.sh deleted file mode 100755 index 6b85aef7..00000000 --- a/tests/command/npar-sign.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh - -# This program tests the SIGN subcommand of npar tests - -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 - 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 1" -cat > $TESTFILE << EOF -set format = F9.3. - -data list notable list /age * height rank *. -begin data. -10 12 11 -12 13 13 -13 14 12 -12 12 10 -9 9 10 -10.3 10.2 12 -end data. - -npar tests - /sign=age height WITH height rank (PAIRED) - /MISSING ANALYSIS - /METHOD=EXACT - . -EOF -if [ $? -ne 0 ] ; then no_result ; fi - - -activity="run program 1" -$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -if [ $? -ne 0 ] ; then no_result ; fi - -activity="compare output 1" -diff -b -c - $TEMPDIR/pspp.csv <