X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Ffile-label.sh;h=72da802999e7d4675279d03666cd24ade772fdac;hb=5853c2fb0300e3db0ac6a06f1d91a7454f53be42;hp=f69e79d28a8f6ebd021573ccfa7a90d151e83411;hpb=c0ed03fd27298cf2b18f0fb373e919ab8b4ae4f4;p=pspp-builds.git diff --git a/tests/command/file-label.sh b/tests/command/file-label.sh index f69e79d2..72da8029 100755 --- a/tests/command/file-label.sh +++ b/tests/command/file-label.sh @@ -3,17 +3,26 @@ # This program tests the FILE LABEL and DOCUMENT commands 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 } @@ -46,11 +55,10 @@ mkdir -p $TEMPDIR cd $TEMPDIR activity="create program" -cat > $TEMPDIR/file-lab.stat << EOF - +cat > $TESTFILE << EOF /* Set up a dummy active file in memory. -data list /x 1 y 2. +data list /X 1 Y 2. begin data. 16 27 @@ -74,8 +82,8 @@ display documents. display file label. /* undocumented feature of PSPP /* Save the active file then get it and display the documents again. -save 'foo.save'. -get 'foo.save'. +save /OUTFILE='foo.save'. +get /FILE='foo.save'. display documents. display file label. /* undocumented feature of PSPP @@ -93,8 +101,8 @@ document There should be another document now. display documents. /* Save and get. -save 'foo.save'. -get 'foo.save'. +save /OUTFILE='foo.save'. +get /FILE='foo.save'. display documents. display file label. /* undocumented feature of PSPP @@ -104,7 +112,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/file-lab.stat +$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 - <