X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Flist.sh;h=ab95a0b35f5f2cc78db557ab418ee6dd64c77b68;hb=2da08e801be698df268f35ac6e21cc8a345ba1fb;hp=c82dd27346c8b951b405bb69cac191ecdb67f0b4;hpb=c48bf64ab648b9b761a8e0774db3672d8009c64c;p=pspp-builds.git diff --git a/tests/command/list.sh b/tests/command/list.sh index c82dd273..ab95a0b3 100755 --- a/tests/command/list.sh +++ b/tests/command/list.sh @@ -3,17 +3,26 @@ # This program tests the LIST command. TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/`basename $0`.sps -here=`pwd`; +# 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 -cd $top_srcdir; top_srcdir=`pwd` +top_srcdir=`cd $top_srcdir; pwd` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH +LANG=C +export LANG cleanup() { + cd / rm -rf $TEMPDIR } @@ -47,13 +56,8 @@ 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='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10. weight by BVAR. list. @@ -61,38 +65,29 @@ list. list /format numbered weight. *** Multiple lines. -remark EOF ----------------------------------------------------------------------- -Testing use of LIST in multi-line cases. ----------------------------------------------------------------------- -EOF 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" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/list.stat +$SUPERVISOR $PSPP --testing-mode $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <