From: John Darrington Date: Wed, 10 Jun 2009 13:11:32 +0000 (+0800) Subject: Added test for the ROC command X-Git-Tag: build37~50^2~24 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a963b40705139469a43f5a117ceba66923b38785;p=pspp-builds.git Added test for the ROC command --- diff --git a/tests/automake.mk b/tests/automake.mk index 7bfd77bf..9824a9fe 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -56,6 +56,7 @@ dist_TESTS = \ tests/command/regression.sh \ tests/command/regression-qr.sh \ tests/command/reliability.sh \ + tests/command/roc.sh \ tests/command/sample.sh \ tests/command/sort.sh \ tests/command/sysfiles.sh \ diff --git a/tests/command/roc.sh b/tests/command/roc.sh new file mode 100755 index 00000000..df3312be --- /dev/null +++ b/tests/command/roc.sh @@ -0,0 +1,170 @@ +#!/bin/sh + +# This program tests the ROC 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 + +# 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 program" +cat > $TESTFILE <