Add scratch file handles.
[pspp-builds.git] / tests / expressions / vectors.sh
index 604920ed27035ef9f155568de1eb2e5d904012d9..0c2239177e5f64eda18b05cf78aa3459ba8e7a97 100755 (executable)
@@ -9,11 +9,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
 }
 
@@ -71,8 +73,9 @@ $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/vectors.stat > $TEMPDIR/vect
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="compare results"
-diff -b -B $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST.  Reading 1 record from the command file.
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - <<EOF
+1.1 DATA LIST.  Reading 1 record from INLINE.
 +--------+------+-------+------+
 |Variable|Record|Columns|Format|
 #========#======#=======#======#
@@ -82,7 +85,6 @@ diff -b -B $TEMPDIR/pspp.list - <<EOF
 |N4      |     1|  4-  4|F1.0  |
 |N5      |     1|  5-  5|F1.0  |
 +--------+------+-------+------+
-
 N1 N2 N3 N4 N5 X1 X2 X3 X4 X5  I
 -- -- -- -- -- -- -- -- -- -- --
  1  2  3  4  5  .  3  .  .  .  5