Greatly simplify PSPP configuration.
[pspp-builds.git] / tests / command / loop.sh
index 2b1383fe2e676be209077ffed075260275d6de51..c49633e61767065742f8ae89ed98527d4701d05b 100755 (executable)
@@ -23,6 +23,10 @@ export LANG
 
 cleanup()
 {
+     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
+       echo "NOT cleaning $TEMPDIR" 
+       return ; 
+     fi
      cd /
      rm -rf $TEMPDIR
 }
@@ -127,7 +131,7 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii -e $TEMPDIR/stdout $TEMPDIR/loop.stat 
+$SUPERVISOR $PSPP -o pspp.csv -e $TEMPDIR/stdout $TEMPDIR/loop.stat 
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare stdout"
@@ -137,82 +141,155 @@ EOF
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list  - <<EOF
+diff -c $TEMPDIR/pspp.csv  - <<EOF
 Loop with index
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
-    9.00 
+
+3.00 
+
+6.00 
+
+9.00 
+
 --------
+
 --------
+
 Loop with IF condition
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
-    9.00 
+
+3.00 
+
+6.00 
+
+9.00 
+
 --------
+
 --------
+
 Loop with END IF condition
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
-    9.00 
+
+3.00 
+
+6.00 
+
+9.00 
+
 --------
-    4.00 
+
+4.00 
+
 --------
+
 Loop with index and IF condition based on index
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
+
+2.00 
+
 --------
-    3.00 
+
+3.00 
+
 --------
+
 --------
+
 Loop with index and END IF condition based on index
-    1.00 
-    2.00 
+
+1.00 
+
+2.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
+
+3.00 
+
+6.00 
+
 --------
+
 --------
+
 Loop with index and IF and END IF condition based on index
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
+
 --------
+
 --------
+
 Loop with no conditions
-    1.00 
+
+1.00 
+
 --------
-    2.00 
-    4.00 
+
+2.00 
+
+4.00 
+
 --------
-    3.00 
-    6.00 
+
+3.00 
+
+6.00 
+
 --------
-    4.00 
+
+4.00 
+
 --------
 EOF
 if [ $? -ne 0 ] ; then fail ; fi