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