Made BSD diff compatible
[pspp] / tests / command / beg-data.sh
index 4820ab660fea114384da1ede0e2bc812ab678703..4c6ee92d3edf4c53e754d58ca4bbf0c79f1505f3 100755 (executable)
@@ -10,11 +10,13 @@ here=`pwd`;
 # ensure that top_srcdir is absolute
 cd $top_srcdir; top_srcdir=`pwd`
 
-export STAT_CONFIG_PATH=$top_srcdir/config
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
 
 
 cleanup()
 {
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -78,7 +80,8 @@ $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare data"
-diff -b -B $TEMPDIR/pspp.list - << foobar
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b $TEMPDIR/pspp.list - << foobar |perl -e 's/^\s*$//g'
 1.1 DATA LIST.  Reading 1 record from the command file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|