X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fprint.sh;h=5ef3faed95854c8a8f0ea6a73820f29039f88962;hb=53ceff2865473a6b561b521986fafd31a993a1a6;hp=78c6212fcfa5ae19f5b7d074e04191573667f391;hpb=f4b04e8323d4c95c3723ca47587742e7175ae75f;p=pspp-builds.git diff --git a/tests/command/print.sh b/tests/command/print.sh index 78c6212f..5ef3faed 100755 --- a/tests/command/print.sh +++ b/tests/command/print.sh @@ -5,10 +5,13 @@ 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` # ensure that top_srcdir is absolute -cd $top_srcdir; top_srcdir=`pwd` +top_srcdir=`cd $top_srcdir; pwd` STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH @@ -73,7 +76,7 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii --testing-mode $TEMPDIR/print.stat > $TEMPDIR/errs +$SUPERVISOR $top_builddir/src/pspp --testing-mode -o raw-ascii --testing-mode $TEMPDIR/print.stat > $TEMPDIR/errs # Note vv --- there are errors in input. Therefore, the command must FAIL if [ $? -eq 0 ] ; then fail ; fi @@ -100,7 +103,7 @@ 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 DATA LIST. Reading free-form data from file $TEMPDIR/data-list.data. +1.1 DATA LIST. Reading free-form data from "$TEMPDIR/data-list.data". +--------+------+ |Variable|Format| #========#======# @@ -109,7 +112,7 @@ diff -b $TEMPDIR/pspp.list - << EOF |C |F8.0 | |D |F8.0 | +--------+------+ -2.1 PRINT. Writing 1 record(s) to file foo. +2.1 PRINT. Writing 1 record to "foo". +--------+------+-------+------+ |Variable|Record|Columns|Format| #========#======#=======#======# @@ -125,7 +128,7 @@ diff -b $TEMPDIR/pspp.list - << EOF . 2.00 3.00 4.00 . 6.00 7.00 8.00 . 10.00 11.00 12.00 -3.1 DATA LIST. Reading free-form data from file $TEMPDIR/data-list.data. +3.1 DATA LIST. Reading free-form data from "$TEMPDIR/data-list.data". +--------+------+ |Variable|Format| #========#======# @@ -134,7 +137,7 @@ diff -b $TEMPDIR/pspp.list - << EOF |C |F8.0 | |D |F8.0 | +--------+------+ -4.1 PRINT. Writing 1 record(s) to the listing file. +4.1 PRINT. Writing 1 record. +--------+------+-------+------+ |Variable|Record|Columns|Format| #========#======#=======#======#