Made BSD diff compatible
[pspp] / tests / command / data-list.sh
index 134c8bba5477c671efdef9d3883ff648224f1d07..99b94aa5b15e7829a1069421b5654f873d7d9565 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
 }
 
@@ -104,7 +106,8 @@ $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii --testing-mode $TESTFI
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare output"
-diff -b -B $TEMPDIR/pspp.list - << EOF
+perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
 1.1 DATA LIST.  Reading free-form data from the command file.
 +--------+------+
 |Variable|Format|