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-$$
11 # ensure that top_srcdir is absolute
12 cd $top_srcdir; top_srcdir=`pwd`
14 export STAT_CONFIG_PATH=$top_srcdir/config
50 activity="create program"
51 cat > $TEMPDIR/out.stat <<EOF
60 /PERCENTILES=HAVERAGE.
63 /PERCENTILES=WAVERAGE.
69 /PERCENTILES=EMPIRICAL.
72 /PERCENTILES=AEMPIRICAL.
74 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="run program"
77 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
78 if [ $? -ne 0 ] ; then no_result ; fi
81 activity="compare results"
82 diff $TEMPDIR/pspp.list - << EOF
83 1.1 DATA LIST. Reading free-form data from the command file.
90 2.1 EXAMINE. Case Processing Summary
91 #=#=============================#
93 # #---------+---------+---------#
94 # # Valid | Missing | Total #
95 # #-+-------+-+-------+-+-------#
96 # #N|Percent|N|Percent|N|Percent#
97 #=#=#=======#=#=======#=#=======#
98 #X#3| 100%|0| 0%|3| 100%#
99 #=#=#=======#=#=======#=#=======#
101 2.2 EXAMINE. Percentiles
102 #================#================================#
104 # #---+---+----+----+----+----+----#
105 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
106 #=#==============#===#===#====#====#====#====#====#
107 #X|HAverage #.40|.80|2.00|5.00|8.00|8.00|8.00#
108 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
109 #=#==============#===#===#====#====#====#====#====#
111 3.1 EXAMINE. Case Processing Summary
112 #=#=============================#
114 # #---------+---------+---------#
115 # # Valid | Missing | Total #
116 # #-+-------+-+-------+-+-------#
117 # #N|Percent|N|Percent|N|Percent#
118 #=#=#=======#=#=======#=#=======#
119 #X#3| 100%|0| 0%|3| 100%#
120 #=#=#=======#=#=======#=#=======#
122 3.2 EXAMINE. Percentiles
123 #==================#================================#
125 # #---+---+----+----+----+----+----#
126 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
127 #=#================#===#===#====#====#====#====#====#
128 #X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
129 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
130 #=#================#===#===#====#====#====#====#====#
132 4.1 EXAMINE. Case Processing Summary
133 #=#=============================#
135 # #---------+---------+---------#
136 # # Valid | Missing | Total #
137 # #-+-------+-+-------+-+-------#
138 # #N|Percent|N|Percent|N|Percent#
139 #=#=#=======#=#=======#=#=======#
140 #X#3| 100%|0| 0%|3| 100%#
141 #=#=#=======#=#=======#=#=======#
143 4.2 EXAMINE. Percentiles
144 #================#================================#
146 # #---+---+----+----+----+----+----#
147 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
148 #=#==============#===#===#====#====#====#====#====#
149 #X|Rounded #.00|.00|2.00|5.00|5.00|8.00|8.00#
150 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
151 #=#==============#===#===#====#====#====#====#====#
153 5.1 EXAMINE. Case Processing Summary
154 #=#=============================#
156 # #---------+---------+---------#
157 # # Valid | Missing | Total #
158 # #-+-------+-+-------+-+-------#
159 # #N|Percent|N|Percent|N|Percent#
160 #=#=#=======#=#=======#=#=======#
161 #X#3| 100%|0| 0%|3| 100%#
162 #=#=#=======#=#=======#=#=======#
164 5.2 EXAMINE. Percentiles
165 #================#==================================#
167 # #----+----+----+----+----+----+----#
168 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
169 #=#==============#====#====#====#====#====#====#====#
170 #X|Empirical #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
171 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
172 #=#==============#====#====#====#====#====#====#====#
174 6.1 EXAMINE. Case Processing Summary
175 #=#=============================#
177 # #---------+---------+---------#
178 # # Valid | Missing | Total #
179 # #-+-------+-+-------+-+-------#
180 # #N|Percent|N|Percent|N|Percent#
181 #=#=#=======#=#=======#=#=======#
182 #X#3| 100%|0| 0%|3| 100%#
183 #=#=#=======#=#=======#=#=======#
185 6.2 EXAMINE. Percentiles
186 #==========================#==================================#
188 # #----+----+----+----+----+----+----#
189 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
190 #=#========================#====#====#====#====#====#====#====#
191 #X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
192 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
193 #=#========================#====#====#====#====#====#====#====#
196 if [ $? -ne 0 ] ; then fail ; fi