3 # This program tests the EXTREME subcommand of the EXAMINE command.
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
54 activity="create program"
84 /statistics=extreme(6)
87 if [ $? -ne 0 ] ; then no_result ; fi
90 activity="run program"
91 $SUPERVISOR $top_builddir/src/pspp -o raw-ascii $TESTFILE
92 if [ $? -ne 0 ] ; then no_result ; fi
94 activity="compare results"
95 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
96 diff -b $TEMPDIR/pspp.list - << EOF
97 1.1 EXAMINE. Case Processing Summary
98 #==#===============================#
100 # #----------+---------+----------#
101 # # Valid | Missing | Total #
102 # #--+-------+-+-------+--+-------#
103 # # N|Percent|N|Percent| N|Percent#
104 #==#==#=======#=#=======#==#=======#
105 #V1#23| 100%|0| 0%|23| 100%#
106 #==#==#=======#=#=======#==#=======#
107 1.2 EXAMINE. Extreme Values
108 #==========#===========#=====#
109 # #Case Number|Value#
110 #==========#===========#=====#
111 #V1Highest1# 21|20.00#
117 # --------#-----------+-----#
124 #==========#===========#=====#
126 if [ $? -ne 0 ] ; then fail ; fi