Made BSD diff compatible
[pspp] / tests / command / file-label.sh
index fea4d876071c421ae39d47da83def3f41a7226a6..839990944250d67f133beb652dce4e3f9e2b92d7 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
 }
 
@@ -114,7 +116,8 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-diff -b -B $TEMPDIR/pspp.filtered - <<EOF
+perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.filtered - <<EOF | perl -e 's/^\s*$//g'
 1.1 DATA LIST.  Reading 1 record from the command file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|