Rewrite PSPP output engine.
[pspp-builds.git] / tests / command / use.sh
index 310368573d81f9c403c2fd879c897655fe6f5345..b6bc661ffdff590e7b8546dea0bae594e425a9c9 100755 (executable)
@@ -20,6 +20,10 @@ export STAT_CONFIG_PATH
 
 cleanup()
 {
+     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
+       echo "NOT cleaning $TEMPDIR" 
+       return ; 
+     fi
      cd /
      rm -rf $TEMPDIR
 }
@@ -75,24 +79,23 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TEMPDIR/filter.stat
+$SUPERVISOR $PSPP -B $STAT_CONFIG_PATH --testing-mode $TEMPDIR/filter.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="check results"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff  -b $TEMPDIR/pspp.list - << EOF
- X
---
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
+diff -c $TEMPDIR/pspp.csv - << EOF
+Table: Data List
+X
+1
+2
+3
+4
+5
+6
+7
+8
+9
 10
 EOF
 if [ $? -ne 0 ] ; then fail ; fi