Initial version
[pspp] / tests / command / trimmed-mean.sh
index 80097a121f547fcc10d0147fdb1448929d12991f..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
 }
 
@@ -50,7 +52,7 @@ cd $TEMPDIR
 
 activity="create program"
 cat > $TESTFILE <<EOF
-DATA LIST LIST /x * c *.
+DATA LIST LIST /X * C *.
 BEGIN DATA.
 1 1
 2 49
@@ -73,7 +75,8 @@ 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|