Make the expression code a little nicer and fix bugs found
[pspp-builds.git] / tests / command / print.sh
index f6f714e10a3587701ba59d4ff2d5f5ac36761458..33d47a7d56a3de42c90da4cd204fd84886b294f1 100755 (executable)
@@ -47,7 +47,7 @@ cd $TEMPDIR
 
 # Copy this file --- it's shared with another test
 activity="create data"
-cp $here/data-list.data $TEMPDIR
+cp $top_srcdir/tests/data-list.data $TEMPDIR
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
@@ -55,28 +55,12 @@ activity="create program"
 cat > $TEMPDIR/print.stat << foobar
 title 'Test PRINT transformation'.
 
-remark EOF
-----------------------------------------------------------------------
-There is no test for DATA LIST FIXED since it is imagined that the
-rest of the tests give it a pretty good workout.
-----------------------------------------------------------------------
-EOF
-remark EOF
-----------------------------------------------------------------------
-Testing use of DATA LIST FREE.
-----------------------------------------------------------------------
-EOF
 data list free table file='$TEMPDIR/data-list.data'/A B C D.
 print outfile="foo" table/A(f8.2) '/' B(e8.2) '/' C(n10) '/' D(rbhex16) '/'.
 print space a.
 print outfile="foo" /a b c d.
 list.
 
-remark EOF
-----------------------------------------------------------------------
-Testing use of DATA LIST LIST.
-----------------------------------------------------------------------
-EOF
 data list list table file='$TEMPDIR/data-list.data'/A B C D.
 print table/A B C D.
 list.
@@ -86,7 +70,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$here/../src/pspp -o raw-ascii --testing-mode $TEMPDIR/print.stat > $TEMPDIR/errs
+$SUPERVISOR $here/../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
 
@@ -109,18 +93,10 @@ $TEMPDIR/data-list.data:6: warning: LIST: Missing value(s) for all variables fro
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
+
 activity="compare output"
 diff -b -B $TEMPDIR/pspp.list - << EOF
-----------------------------------------------------------------------
-There is no test for DATA LIST FIXED since it is imagined that the
-rest of the tests give it a pretty good workout.
-----------------------------------------------------------------------
-
-----------------------------------------------------------------------
-Testing use of DATA LIST FREE.
-----------------------------------------------------------------------
-
-1.1 DATA LIST.  Reading free-form data from file 
+1.1 DATA LIST.  Reading free-form data from file $TEMPDIR/data-list.data.
 +--------+------+
 |Variable|Format|
 #========#======#
@@ -130,7 +106,7 @@ Testing use of DATA LIST FREE.
 |D       |F8.0  |
 +--------+------+
 
-2.1 PRINT.  Writing   1 records to file "foo".
+2.1 PRINT.  Writing 1 record(s) to file foo.
 +--------+------+-------+-------+
 |Variable|Record|Columns| Format|
 #========#======#=======#=======#
@@ -153,11 +129,7 @@ Testing use of DATA LIST FREE.
 
      .      10.00    11.00    12.00 
 
-----------------------------------------------------------------------
-Testing use of DATA LIST LIST.
-----------------------------------------------------------------------
-
-3.1 DATA LIST.  Reading free-form data from file 
+3.1 DATA LIST.  Reading free-form data from file $TEMPDIR/data-list.data.
 +--------+------+
 |Variable|Format|
 #========#======#
@@ -167,7 +139,7 @@ Testing use of DATA LIST LIST.
 |D       |F8.0  |
 +--------+------+
 
-4.1 PRINT.  Writing   1 records to the listing file.
+4.1 PRINT.  Writing 1 record(s) to the listing file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|
 #========#======#=======#======#
@@ -191,6 +163,7 @@ Testing use of DATA LIST LIST.
    10.00    11.00      .        .   
    12.00      .        .        .   
    12.00      .        .        .   
+
 EOF
 if [ $? -ne 0 ] ; then fail ; fi