3 # This program tests the PERCENTILES subcommand of the EXAMINE command.
4 # In particular it tests that it behaves properly when there are only
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
12 # ensure that top_srcdir is absolute
13 cd $top_srcdir; top_srcdir=`pwd`
15 STAT_CONFIG_PATH=$top_srcdir/config
16 export STAT_CONFIG_PATH
53 activity="create program"
63 /PERCENTILES=HAVERAGE.
66 /PERCENTILES=WAVERAGE.
72 /PERCENTILES=EMPIRICAL.
75 /PERCENTILES=AEMPIRICAL.
77 if [ $? -ne 0 ] ; then no_result ; fi
79 activity="run program"
80 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
81 if [ $? -ne 0 ] ; then no_result ; fi
84 activity="compare results"
85 perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
86 diff -b $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g'
87 1.1 DATA LIST. Reading free-form data from the command file.
94 2.1 EXAMINE. Case Processing Summary
95 #=#=============================#
97 # #---------+---------+---------#
98 # # Valid | Missing | Total #
99 # #-+-------+-+-------+-+-------#
100 # #N|Percent|N|Percent|N|Percent#
101 #=#=#=======#=#=======#=#=======#
102 #X#3| 100%|0| 0%|3| 100%#
103 #=#=#=======#=#=======#=#=======#
105 2.2 EXAMINE. Percentiles
106 #================#================================#
108 # #---+---+----+----+----+----+----#
109 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
110 #=#==============#===#===#====#====#====#====#====#
111 #X|HAverage #.40|.80|2.00|5.00|8.00|8.00|8.00#
112 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
113 #=#==============#===#===#====#====#====#====#====#
115 3.1 EXAMINE. Case Processing Summary
116 #=#=============================#
118 # #---------+---------+---------#
119 # # Valid | Missing | Total #
120 # #-+-------+-+-------+-+-------#
121 # #N|Percent|N|Percent|N|Percent#
122 #=#=#=======#=#=======#=#=======#
123 #X#3| 100%|0| 0%|3| 100%#
124 #=#=#=======#=#=======#=#=======#
126 3.2 EXAMINE. Percentiles
127 #==================#================================#
129 # #---+---+----+----+----+----+----#
130 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
131 #=#================#===#===#====#====#====#====#====#
132 #X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
133 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
134 #=#================#===#===#====#====#====#====#====#
136 4.1 EXAMINE. Case Processing Summary
137 #=#=============================#
139 # #---------+---------+---------#
140 # # Valid | Missing | Total #
141 # #-+-------+-+-------+-+-------#
142 # #N|Percent|N|Percent|N|Percent#
143 #=#=#=======#=#=======#=#=======#
144 #X#3| 100%|0| 0%|3| 100%#
145 #=#=#=======#=#=======#=#=======#
147 4.2 EXAMINE. Percentiles
148 #================#================================#
150 # #---+---+----+----+----+----+----#
151 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
152 #=#==============#===#===#====#====#====#====#====#
153 #X|Rounded #.00|.00|2.00|5.00|5.00|8.00|8.00#
154 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
155 #=#==============#===#===#====#====#====#====#====#
157 5.1 EXAMINE. Case Processing Summary
158 #=#=============================#
160 # #---------+---------+---------#
161 # # Valid | Missing | Total #
162 # #-+-------+-+-------+-+-------#
163 # #N|Percent|N|Percent|N|Percent#
164 #=#=#=======#=#=======#=#=======#
165 #X#3| 100%|0| 0%|3| 100%#
166 #=#=#=======#=#=======#=#=======#
168 5.2 EXAMINE. Percentiles
169 #================#==================================#
171 # #----+----+----+----+----+----+----#
172 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
173 #=#==============#====#====#====#====#====#====#====#
174 #X|Empirical #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
175 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
176 #=#==============#====#====#====#====#====#====#====#
178 6.1 EXAMINE. Case Processing Summary
179 #=#=============================#
181 # #---------+---------+---------#
182 # # Valid | Missing | Total #
183 # #-+-------+-+-------+-+-------#
184 # #N|Percent|N|Percent|N|Percent#
185 #=#=#=======#=#=======#=#=======#
186 #X#3| 100%|0| 0%|3| 100%#
187 #=#=#=======#=#=======#=#=======#
189 6.2 EXAMINE. Percentiles
190 #==========================#==================================#
192 # #----+----+----+----+----+----+----#
193 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
194 #=#========================#====#====#====#====#====#====#====#
195 #X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
196 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
197 #=#========================#====#====#====#====#====#====#====#
200 if [ $? -ne 0 ] ; then fail ; fi