X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Flist.sh;h=80be418af34e83a7edef8a80240c483fec799e92;hb=f4b04e8323d4c95c3723ca47587742e7175ae75f;hp=292ff65c9a31389ea50a77a993ca4f2bf03b567c;hpb=c0ed03fd27298cf2b18f0fb373e919ab8b4ae4f4;p=pspp diff --git a/tests/command/list.sh b/tests/command/list.sh index 292ff65c9a..80be418af3 100755 --- a/tests/command/list.sh +++ b/tests/command/list.sh @@ -3,17 +3,20 @@ # This program tests the LIST command. TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/`basename $0`.sps here=`pwd`; # ensure that top_srcdir is absolute cd $top_srcdir; top_srcdir=`pwd` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -47,52 +50,38 @@ cd $TEMPDIR activity="create program" -cat > $TEMPDIR/list.stat << foobar +cat > $TESTFILE << EOF *** Single lines. -remark EOF ----------------------------------------------------------------------- -Testing use of LIST in single-line cases. ----------------------------------------------------------------------- -EOF -data list file='$here/weighting.data'/AVAR 1-5 BVAR 6-10. +data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10. weight by BVAR. list. *list /cases=from 5 to 20 by 2 /format numbered. list /format numbered weight. *** Multiple lines. -remark EOF ----------------------------------------------------------------------- -Testing use of LIST in multi-line cases. ----------------------------------------------------------------------- -EOF -data list file='$here/list.data' notable /X000 to X126 1-127. +data list file='$top_srcdir/tests/list.data' notable /X000 to X126 1-127. *list /cases=from 1 to 25 by 5 /format numbered. list x000 to x030. list /cases=from 1 to 25. -foobar +EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/list.stat +$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <