X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=tests%2Fcommand%2Flist.sh;h=dfeb29c332d20b121a2f77c7c4eada132937e297;hb=dfd1972f7bcb550a4fc3b05dbe7e71d12334b0a7;hp=8b96af218e1b022673b0c856d31406bb559466bd;hpb=f10ed4942f0f2253d236d5e454a8ab702ed7e72b;p=pspp-builds.git diff --git a/tests/command/list.sh b/tests/command/list.sh index 8b96af21..dfeb29c3 100755 --- a/tests/command/list.sh +++ b/tests/command/list.sh @@ -3,17 +3,30 @@ # 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() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi + cd / rm -rf $TEMPDIR } @@ -47,310 +60,200 @@ 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. +list /format numbered. *** 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 $PSPP --testing-mode $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <