Instead of hard-coding the table of powers of 30 into the source file,
[pspp-builds.git] / tests / command / examine.sh
index 55c80a8a914436e76d59cd8f74e1d64d96fcbcc7..f8d3ccad3573113c13c30dcbcf28ef5edde29fe6 100755 (executable)
@@ -3,13 +3,15 @@
 # This program tests  the EXAMINE command.
 
 TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
 
 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()
@@ -46,8 +48,8 @@ mkdir -p $TEMPDIR
 cd $TEMPDIR
 
 activity="create program"
-cat > $TEMPDIR/out.stat <<EOF
-DATA LIST LIST /quality * w * brand * .
+cat > $TESTFILE <<EOF
+DATA LIST LIST /QUALITY * W * BRAND * .
 BEGIN DATA
 3  1  1
 2  2  1
@@ -85,13 +87,13 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 # NOTE:  In the following data: Only the extreme values have been checked
 # The descriptives have been blindly pasted.
 activity="compare results"
-diff $TEMPDIR/pspp.list - << EOF
+diff -b -B $TEMPDIR/pspp.list - << EOF
 1.1 DATA LIST.  Reading free-form data from the command file.
 +--------+------+
 |Variable|Format|