X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Flist.sh;h=a11ea78dd665719608844cea402596b778083856;hb=0a490aaca0b5a6350d3428101b8c496f396ac26b;hp=b73684d1ce3d23fe2a0ca852abd17afbd6d16370;hpb=97d6c6f6b1922621ca013668eba9a9a9f71d60fe;p=pspp-builds.git diff --git a/tests/command/list.sh b/tests/command/list.sh index b73684d1..a11ea78d 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,7 +56,7 @@ cd $TEMPDIR activity="create program" -cat > $TEMPDIR/list.stat << foobar +cat > $TESTFILE << EOF *** Single lines. data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10. weight by BVAR. @@ -61,24 +70,24 @@ data list file='$top_srcdir/tests/list.data' notable /X000 to X126 1-127. 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 -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <