X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Ffile-label.sh;h=0d3500eb8dd4d6a67ee4f495705a8396c4fcd710;hb=65f688e8b8528c5e60b0f6d5fe1654abf6fa5c35;hp=fea4d876071c421ae39d47da83def3f41a7226a6;hpb=1339492699ce7e12c9bf9fa17f9d60a66024cbd1;p=pspp-builds.git diff --git a/tests/command/file-label.sh b/tests/command/file-label.sh index fea4d876..0d3500eb 100755 --- a/tests/command/file-label.sh +++ b/tests/command/file-label.sh @@ -5,16 +5,24 @@ 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 } @@ -71,13 +79,13 @@ Note that the last line should end with a period: . /* Display the documents. display documents. -display file label. /* undocumented feature of PSPP +display file label. /* Save the active file then get it and display the documents again. save /OUTFILE='foo.save'. get /FILE='foo.save'. display documents. -display file label. /* undocumented feature of PSPP +display file label. /* There is an interesting interaction that occurs if the 'execute' /* command below. What happens is that an error message is output @@ -96,7 +104,7 @@ display documents. save /OUTFILE='foo.save'. get /FILE='foo.save'. display documents. -display file label. /* undocumented feature of PSPP +display file label. /* Done. @@ -104,7 +112,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi # We need to filter out the dates/times @@ -114,49 +122,37 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.filtered - <