X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fvariable-display.sh;h=fece96e69ab5ac56f39e50a8fc41045fef701942;hb=934ab1787fa4b4799e5bafd39ef650826895d567;hp=bb639d10f6e8829ad012ddaed0201555e963a234;hpb=4e342b9c38c26c4e61196a39eb350665025ecdef;p=pspp diff --git a/tests/command/variable-display.sh b/tests/command/variable-display.sh index bb639d10f6..fece96e69a 100755 --- a/tests/command/variable-display.sh +++ b/tests/command/variable-display.sh @@ -10,7 +10,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` @@ -21,6 +21,10 @@ export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -66,31 +70,24 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then fail ; fi activity="compare output" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << EOF -1.1 DISPLAY. -+--------+-------------------------------------------+--------+ -|Variable|Description |Position| -#========#===========================================#========# -|x |Format: F8.2 | 1| -| |Measure: Scale | | -| |Display Alignment: Left | | -| |Display Width: 10 | | -+--------+-------------------------------------------+--------+ -|y |Format: F8.2 | 2| -| |Measure: Ordinal | | -| |Display Alignment: Right | | -| |Display Width: 12 | | -+--------+-------------------------------------------+--------+ -|z |Format: F8.2 | 3| -| |Measure: Nominal | | -| |Display Alignment: Center | | -| |Display Width: 14 | | -+--------+-------------------------------------------+--------+ +diff -c $TEMPDIR/pspp.csv - << EOF +Variable,Description,,Position +x,Format: F8.2,,1 +,Measure: Scale,, +,Display Alignment: Left,, +,Display Width: 10,, +y,Format: F8.2,,2 +,Measure: Ordinal,, +,Display Alignment: Right,, +,Display Width: 12,, +z,Format: F8.2,,3 +,Measure: Nominal,, +,Display Alignment: Center,, +,Display Width: 14,, EOF if [ $? -ne 0 ] ; then fail ; fi