X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fsample.sh;h=eb58b061e39eb17003045b978bea16c52ba65930;hb=21f2e65c7c2555bf5422920651eab07d1e8f5154;hp=4f4515e2be05073a21a85232970a2bdbe77b5069;hpb=af4066391f20365e210460a736b1b02efe194da6;p=pspp diff --git a/tests/command/sample.sh b/tests/command/sample.sh index 4f4515e2be..eb58b061e3 100755 --- a/tests/command/sample.sh +++ b/tests/command/sample.sh @@ -9,7 +9,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps 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 # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -81,23 +81,21 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode $TEMPDIR/sample.stat +$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/sample.stat if [ $? -ne 0 ] ; then no_result ; fi activity="create head" -grep -v '^\ *$' $TEMPDIR/pspp.list | head -2 > $TEMPDIR/head +grep -v '^[ ]*$' $TEMPDIR/pspp.csv | head -1 > $TEMPDIR/head if [ $? -ne 0 ] ; then no_result ; fi activity="extract data" -grep '[0-9][0-9]*' $TEMPDIR/pspp.list > $TEMPDIR/data +grep '[0-9][0-9]*' $TEMPDIR/pspp.csv > $TEMPDIR/data if [ $? -ne 0 ] ; then no_result ; fi activity="compare head" -perl -pi -e 's/^\s*$//g' $TEMPDIR/head diff -b $TEMPDIR/head - << EOF - A --- +Table: Data List EOF if [ $? -ne 0 ] ; then fail ; fi