DESCRIPTIVES: Convert tests to use Autotest.
[pspp-builds.git] / tests / bugs / agg-crash-2.sh
index cdb94cdc2d9f2645cbd4ccce38a03f943a9d8b89..98bd8dcfe33b4d0de93afd57ed1823d9f26d1a2f 100755 (executable)
@@ -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
 }
@@ -70,22 +74,20 @@ LIST /x y.
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
-$SUPERVISOR $PSPP --testing-mode $TESTFILE
+$SUPERVISOR $PSPP -o pspp.csv $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b  -w $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from INLINE.
-+--------+------+
-|Variable|Format|
-#========#======#
-|X       |F8.2  |
-|Y       |A25   |
-+--------+------+
-        X                         Y
---------- -------------------------
-    87.34 bar                       
-    87.50 foo                       
+activity="compare output"
+diff $TEMPDIR/pspp.csv - << EOF | cat -E
+Table: Reading free-form data from INLINE.
+Variable,Format
+X,F8.2
+Y,A25
+
+Table: Data List
+X,Y
+87.34,bar                      
+87.50,foo                      
 EOF
 if [ $? -ne 0 ] ; then fail ; fi