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 diff -b -B $TEMPDIR/pspp.list - << EOF
86 1.1 DATA LIST. Reading free-form data from the command file.
93 2.1 EXAMINE. Case Processing Summary
94 #=#=============================#
96 # #---------+---------+---------#
97 # # Valid | Missing | Total #
98 # #-+-------+-+-------+-+-------#
99 # #N|Percent|N|Percent|N|Percent#
100 #=#=#=======#=#=======#=#=======#
101 #X#3| 100%|0| 0%|3| 100%#
102 #=#=#=======#=#=======#=#=======#
104 2.2 EXAMINE. Percentiles
105 #================#================================#
107 # #---+---+----+----+----+----+----#
108 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
109 #=#==============#===#===#====#====#====#====#====#
110 #X|HAverage #.40|.80|2.00|5.00|8.00|8.00|8.00#
111 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
112 #=#==============#===#===#====#====#====#====#====#
114 3.1 EXAMINE. Case Processing Summary
115 #=#=============================#
117 # #---------+---------+---------#
118 # # Valid | Missing | Total #
119 # #-+-------+-+-------+-+-------#
120 # #N|Percent|N|Percent|N|Percent#
121 #=#=#=======#=#=======#=#=======#
122 #X#3| 100%|0| 0%|3| 100%#
123 #=#=#=======#=#=======#=#=======#
125 3.2 EXAMINE. Percentiles
126 #==================#================================#
128 # #---+---+----+----+----+----+----#
129 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
130 #=#================#===#===#====#====#====#====#====#
131 #X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
132 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
133 #=#================#===#===#====#====#====#====#====#
135 4.1 EXAMINE. Case Processing Summary
136 #=#=============================#
138 # #---------+---------+---------#
139 # # Valid | Missing | Total #
140 # #-+-------+-+-------+-+-------#
141 # #N|Percent|N|Percent|N|Percent#
142 #=#=#=======#=#=======#=#=======#
143 #X#3| 100%|0| 0%|3| 100%#
144 #=#=#=======#=#=======#=#=======#
146 4.2 EXAMINE. Percentiles
147 #================#================================#
149 # #---+---+----+----+----+----+----#
150 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
151 #=#==============#===#===#====#====#====#====#====#
152 #X|Rounded #.00|.00|2.00|5.00|5.00|8.00|8.00#
153 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
154 #=#==============#===#===#====#====#====#====#====#
156 5.1 EXAMINE. Case Processing Summary
157 #=#=============================#
159 # #---------+---------+---------#
160 # # Valid | Missing | Total #
161 # #-+-------+-+-------+-+-------#
162 # #N|Percent|N|Percent|N|Percent#
163 #=#=#=======#=#=======#=#=======#
164 #X#3| 100%|0| 0%|3| 100%#
165 #=#=#=======#=#=======#=#=======#
167 5.2 EXAMINE. Percentiles
168 #================#==================================#
170 # #----+----+----+----+----+----+----#
171 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
172 #=#==============#====#====#====#====#====#====#====#
173 #X|Empirical #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
174 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
175 #=#==============#====#====#====#====#====#====#====#
177 6.1 EXAMINE. Case Processing Summary
178 #=#=============================#
180 # #---------+---------+---------#
181 # # Valid | Missing | Total #
182 # #-+-------+-+-------+-+-------#
183 # #N|Percent|N|Percent|N|Percent#
184 #=#=#=======#=#=======#=#=======#
185 #X#3| 100%|0| 0%|3| 100%#
186 #=#=#=======#=#=======#=#=======#
188 6.2 EXAMINE. Percentiles
189 #==========================#==================================#
191 # #----+----+----+----+----+----+----#
192 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
193 #=#========================#====#====#====#====#====#====#====#
194 #X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
195 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
196 #=#========================#====#====#====#====#====#====#====#
199 if [ $? -ne 0 ] ; then fail ; fi