Rewrite PSPP output engine.
[pspp-builds.git] / tests / command / variable-display.sh
index bb639d10f6e8829ad012ddaed0201555e963a234..1cf74f34881b6bd67319352458e8747f3b5d45de 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,27 +74,20 @@ $SUPERVISOR $PSPP --testing-mode $TESTFILE
 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 DISPLAY.
-+--------+-------------------------------------------+--------+
-|Variable|Description                                |Position|
-#========#===========================================#========#
-|x       |Format: F8.2                               |       1|
-|        |Measure: Scale                             |        |
-|        |Display Alignment: Left                    |        |
-|        |Display Width: 10                          |        |
-+--------+-------------------------------------------+--------+
-|y       |Format: F8.2                               |       2|
-|        |Measure: Ordinal                           |        |
-|        |Display Alignment: Right                   |        |
-|        |Display Width: 12                          |        |
-+--------+-------------------------------------------+--------+
-|z       |Format: F8.2                               |       3|
-|        |Measure: Nominal                           |        |
-|        |Display Alignment: Center                  |        |
-|        |Display Width: 14                          |        |
-+--------+-------------------------------------------+--------+
+diff -c $TEMPDIR/pspp.csv - << EOF
+Variable,Description,,Position
+x,Format: F8.2,,1
+,Measure: Scale,,
+,Display Alignment: Left,,
+,Display Width: 10,,
+y,Format: F8.2,,2
+,Measure: Ordinal,,
+,Display Alignment: Right,,
+,Display Width: 12,,
+z,Format: F8.2,,3
+,Measure: Nominal,,
+,Display Alignment: Center,,
+,Display Width: 14,,
 EOF
 if [ $? -ne 0 ] ; then fail ; fi