X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fformats%2F360.sh;h=e64696805f2a3a7c8a72d3d39044e7ea05b6002e;hb=493527639c58bd78c7951260b32a6dcfc68abaee;hp=c813e648767c11f4a880d9de5018a7c4733b6c5c;hpb=d0371553a98cd169353bf6d211e375e5ffc3a3bd;p=pspp diff --git a/tests/formats/360.sh b/tests/formats/360.sh index c813e64876..e64696805f 100755 --- a/tests/formats/360.sh +++ b/tests/formats/360.sh @@ -8,7 +8,7 @@ TEMPDIR=/tmp/pspp-tst-$$ 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 +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT : ${PERL:=perl} # ensure that top_srcdir is absolute @@ -20,6 +20,10 @@ export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -227,26 +231,26 @@ list. EOF if [ $? -ne 0 ] ; then no_result ; fi - # Make sure that pspp.list isn't left over from another run. - rm -f pspp.list + # Make sure that pspp.csv isn't left over from another run. + rm -f pspp.csv activity="run $type.pspp" - $SUPERVISOR $PSPP --testing-mode $type.pspp + $SUPERVISOR $PSPP -o pspp.csv $type.pspp if [ $? -ne 0 ] ; then fail ; fi activity="compare $type.pspp output" - perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list - diff -b $TEMPDIR/pspp.list - << EOF - start end count ----------- ---------- ----- -07/22/2007 10/06/2007 321 -07/14/1789 08/26/1789 4 -01/01/1972 12/31/1999 682 - start end count ----------- ---------- ----- -07/22/2007 10/06/2007 322 -07/14/1789 08/26/1789 5 -01/01/1972 12/31/1999 683 + diff -c $TEMPDIR/pspp.csv - << EOF +Table: Data List +start,end,count +07/22/2007,10/06/2007,321 +07/14/1789,08/26/1789,4 +01/01/1972,12/31/1999,682 + +Table: Data List +start,end,count +07/22/2007,10/06/2007,322 +07/14/1789,08/26/1789,5 +01/01/1972,12/31/1999,683 EOF if [ $? -ne 0 ] ; then fail ; fi done