projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/stable'
[pspp]
/
tests
/
command
/
weight.sh
diff --git
a/tests/command/weight.sh
b/tests/command/weight.sh
index 7dd31a372f80d13a84e99d00d2a3561ec9ca362a..6d90315652246bb061504b15db42a7d68880ec29 100755
(executable)
--- a/
tests/command/weight.sh
+++ b/
tests/command/weight.sh
@@
-5,18
+5,28
@@
TEMPDIR=/tmp/pspp-tst-$$
TESTFILE=$TEMPDIR/`basename $0`.sps
TEMPDIR=/tmp/pspp-tst-$$
TESTFILE=$TEMPDIR/`basename $0`.sps
-here=`pwd`;
+# ensure that top_builddir are absolute
+if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
+if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
+top_builddir=`cd $top_builddir; pwd`
+PSPP=$top_builddir/src/ui/terminal/pspp
# ensure that top_srcdir is absolute
# ensure that top_srcdir is absolute
-
cd $top_srcdir; top_srcdir=`
pwd`
+
top_srcdir=`cd $top_srcdir;
pwd`
STAT_CONFIG_PATH=$top_srcdir/config
export STAT_CONFIG_PATH
STAT_CONFIG_PATH=$top_srcdir/config
export STAT_CONFIG_PATH
+LANG=C
+export LANG
+
cleanup()
{
cleanup()
{
- if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then return ; fi
+ if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
+ echo "NOT cleaning $TEMPDIR"
+ return ;
+ fi
cd /
rm -rf $TEMPDIR
}
cd /
rm -rf $TEMPDIR
}
@@
-62,13
+72,13
@@
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
activity="run program"
-$SUPERVISOR $
here/../src/pspp --testing-mode -o raw-ascii
$TESTFILE
+$SUPERVISOR $
PSPP --testing-mode
$TESTFILE
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare results"
perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
diff -b $TEMPDIR/pspp.list - <<EOF
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare results"
perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
diff -b $TEMPDIR/pspp.list - <<EOF
-1.1 DATA LIST. Reading 1 record from
file $top_srcdir/tests/weighting.data
.
+1.1 DATA LIST. Reading 1 record from
"$top_srcdir/tests/weighting.data"
.
+--------+------+-------+------+
|Variable|Record|Columns|Format|
#========#======#=======#======#
+--------+------+-------+------+
|Variable|Record|Columns|Format|
#========#======#=======#======#
@@
-81,7
+91,7
@@
diff -b $TEMPDIR/pspp.list - <<EOF
#========#=======#=========#======#========#=======#========#========#========#========#========#======#=======#=======#=========#
|AVAR # 730| 0|31.515| .405| 10.937| 119.608| 2.411| .181| 1.345| .090|76.000| 18.000| 94.000|23006.000|
+--------#-------+---------+------+--------+-------+--------+--------+--------+--------+--------+------+-------+-------+---------+
#========#=======#=========#======#========#=======#========#========#========#========#========#======#=======#=======#=========#
|AVAR # 730| 0|31.515| .405| 10.937| 119.608| 2.411| .181| 1.345| .090|76.000| 18.000| 94.000|23006.000|
+--------#-------+---------+------+--------+-------+--------+--------+--------+--------+--------+------+-------+-------+---------+
-3.1 FREQUENCIES. AVAR
:
+3.1 FREQUENCIES. AVAR
+--------+--------+---+---+
| | | |Cum|
| Value | Freq |Pct|Pct|
+--------+--------+---+---+
| | | |Cum|
| Value | Freq |Pct|Pct|
@@
-139,24
+149,24
@@
diff -b $TEMPDIR/pspp.list - <<EOF
| 80| 1| 0|100|
| 94| 1| 0|100|
+--------+--------+---+---+
| 80| 1| 0|100|
| 94| 1| 0|100|
+--------+--------+---+---+
-+-----------------+---------+
-|N
Valid
| 730|
-|
Missing
| 0|
-|Mean | 31.515|
-|S.E. Mean | .405|
-|M
edian | 28.5
00|
-|
Mode | 21.000
|
-|
Std Dev | 10.937
|
-|
Variance | 119.608
|
-|
Kurtosis | 2.41
1|
-|S
.E. Kurt | .181
|
-|S
kewness | 1.345
|
-|
S.E. Skew | .09
0|
-|
Range | 76
.000|
-|M
inimum | 18
.000|
-|
Maximum | 94
.000|
-|
Sum |23006.0
00|
-+-----------------+---------+
++-----------------
------
+---------+
+|N
Valid
| 730|
+|
Missing
| 0|
+|Mean
| 31.515|
+|S.E. Mean
| .405|
+|M
ode | 21.0
00|
+|
Std Dev | 10.937
|
+|
Variance | 119.608
|
+|
Kurtosis | 2.411
|
+|
S.E. Kurt | .18
1|
+|S
kewness | 1.345
|
+|S
.E. Skew | .090
|
+|
Range | 76.00
0|
+|
Minimum | 18
.000|
+|M
aximum | 94
.000|
+|
Sum |23006
.000|
+|
Percentiles 50 (Median)| 28.5
00|
++-----------------
------
+---------+
EOF
if [ $? -ne 0 ] ; then fail ; fi
EOF
if [ $? -ne 0 ] ; then fail ; fi