3 # This program tests the wilcoxon subcommand of npar tests
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_srcdir and top_builddir are absolute
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
11 top_srcdir=`cd $top_srcdir; pwd`
12 top_builddir=`cd $top_builddir; pwd`
14 PSPP=$top_builddir/src/ui/terminal/pspp
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
25 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
26 echo "NOT cleaning $TEMPDIR"
60 activity="create program 1"
61 cat > $TESTFILE << EOF
62 data list notable list /foo * bar * w *.
80 variable labels foo "first" bar "second".
85 /wilcoxon=foo with bar (paired)
90 if [ $? -ne 0 ] ; then no_result ; fi
93 activity="run program 1"
94 $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
95 if [ $? -ne 0 ] ; then no_result ; fi
98 activity="generate results"
99 cat > $TEMPDIR/results.txt <<EOF
100 1.1 NPAR TESTS. Ranks
101 #============================#==#=========#============#
102 # # N|Mean Rank|Sum of Ranks#
103 #============================#==#=========#============#
104 #second - firstNegative Ranks# 5| 8.60| 43.00#
105 # Positive Ranks# 8| 6.00| 48.00#
108 #============================#==#=========#============#
110 1.2 NPAR TESTS. Test Statistics
111 #=====================#==============#
113 #=====================#==============#
115 #Asymp. Sig (2-tailed)# .861#
116 #Exact Sig (2-tailed) # .893#
117 #Exact Sig (1-tailed) # .446#
118 #=====================#==============#
121 if [ $? -ne 0 ] ; then no_result ; fi
124 activity="compare output 1"
125 diff pspp.list $TEMPDIR/results.txt
126 if [ $? -ne 0 ] ; then fail ; fi
129 # No weights this time. But some missing values
130 activity="create program 2"
131 cat > $TESTFILE << EOF
132 data list notable list /foo * bar * dummy *.
152 variable labels foo "first" bar "second".
155 /wilcoxon=foo with bar (paired)
160 if [ $? -ne 0 ] ; then no_result ; fi
163 activity="run program 2"
164 $SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
165 if [ $? -ne 0 ] ; then no_result ; fi
168 activity="compare output 2"
169 diff pspp.list $TEMPDIR/results.txt
170 if [ $? -ne 0 ] ; then fail ; fi