Made BSD diff compatible
[pspp-builds.git] / tests / bugs / t-test-with-temp.sh
index 520804d69f167acb79a70e4c81bd1fef8508f787..1bebba99fbf21a812b64867eca837edaeb48a153 100755 (executable)
@@ -17,6 +17,7 @@ export STAT_CONFIG_PATH
 
 cleanup()
 {
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -94,7 +95,8 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="compare output"
-diff -B -b $TEMPDIR/pspp.list $TEMPDIR/first.list
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list $TEMPDIR/first.list
+diff -b $TEMPDIR/pspp.list $TEMPDIR/first.list
 if [ $? -ne 0 ] ; then fail ; fi