Made BSD diff compatible
[pspp] / tests / command / lag.sh
index e1a16993ac071bbabbe637d092c97ddffc913f33..70d46e95606540c9a98cea51df1c319cbd8a315d 100755 (executable)
@@ -16,6 +16,7 @@ export STAT_CONFIG_PATH
 
 cleanup()
 {
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -70,7 +71,8 @@ $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/lag.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare result"
-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 1 record from the command file.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|