Initial version
[pspp] / tests / command / trimmed-mean.sh
index 6a6ee3a4c142f0c8c9508cae1027212a852f4d20..1fc45c70e3948583bdef95c8b9128f794ccefac0 100755 (executable)
@@ -11,11 +11,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
 }
 
@@ -49,8 +51,8 @@ cd $TEMPDIR
 
 
 activity="create program"
-cat > $TEMPDIR/out.stat <<EOF
-DATA LIST LIST /x * c *.
+cat > $TESTFILE <<EOF
+DATA LIST LIST /X * C *.
 BEGIN DATA.
 1 1
 2 49
@@ -68,12 +70,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
 
 
 activity="compare results"
-diff $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 free-form data from the command file.
 +--------+------+
 |Variable|Format|