projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed blank replacement
[pspp]
/
tests
/
command
/
trimmed-mean.sh
diff --git
a/tests/command/trimmed-mean.sh
b/tests/command/trimmed-mean.sh
index 8b84a31c47c24d9bb38f916d54518910c6cdc819..0d65db5ef03e81dda3f76b984f8224868fdee23b 100755
(executable)
--- a/
tests/command/trimmed-mean.sh
+++ b/
tests/command/trimmed-mean.sh
@@
-4,17
+4,20
@@
# where the data is weighted towards the centre
TEMPDIR=/tmp/pspp-tst-$$
# where the data is weighted towards the centre
TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
here=`pwd`;
# ensure that top_srcdir is absolute
cd $top_srcdir; top_srcdir=`pwd`
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()
{
cleanup()
{
+ cd /
rm -rf $TEMPDIR
}
rm -rf $TEMPDIR
}
@@
-48,8
+51,8
@@
cd $TEMPDIR
activity="create program"
activity="create program"
-cat > $TE
MPDIR/out.stat
<<EOF
-DATA LIST LIST /
x * c
*.
+cat > $TE
STFILE
<<EOF
+DATA LIST LIST /
X * C
*.
BEGIN DATA.
1 1
2 49
BEGIN DATA.
1 1
2 49
@@
-67,12
+70,13
@@
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TE
MPDIR/out.stat
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TE
STFILE
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare results"
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
1.1 DATA LIST. Reading free-form data from the command file.
+--------+------+
|Variable|Format|
1.1 DATA LIST. Reading free-form data from the command file.
+--------+------+
|Variable|Format|
@@
-80,7
+84,6
@@
diff $TEMPDIR/pspp.list - << EOF
|X |F8.0 |
|C |F8.0 |
+--------+------+
|X |F8.0 |
|C |F8.0 |
+--------+------+
-
2.1 EXAMINE. Case Processing Summary
#=#===============================#
# # Cases #
2.1 EXAMINE. Case Processing Summary
#=#===============================#
# # Cases #
@@
-91,7
+94,6
@@
diff $TEMPDIR/pspp.list - << EOF
#=#==#=======#=#=======#==#=======#
#X#52| 100%|0| 0%|52| 100%#
#=#==#=======#=#=======#==#=======#
#=#==#=======#=#=======#==#=======#
#X#52| 100%|0| 0%|52| 100%#
#=#==#=======#=#=======#==#=======#
-
2.2 EXAMINE. Descriptives
#============================================#=========#==========#
# #Statistic|Std. Error#
2.2 EXAMINE. Descriptives
#============================================#=========#==========#
# #Statistic|Std. Error#
@@
-110,7
+112,6
@@
diff $TEMPDIR/pspp.list - << EOF
# Skewness # 1.194 | .330 #
# Kurtosis # 15.732 | .650 #
#============================================#=========#==========#
# Skewness # 1.194 | .330 #
# Kurtosis # 15.732 | .650 #
#============================================#=========#==========#
-
EOF
if [ $? -ne 0 ] ; then fail ; fi
EOF
if [ $? -ne 0 ] ; then fail ; fi