Add copyright and licence notices to files which lack them.
[pspp] / tests / language / stats / frequencies.at
index f0d81c321075d4edec21af52a38520acf88fd03a..73eb6b933964f5ec4ff4b1446666a55bf1cc023f 100644 (file)
@@ -1,4 +1,19 @@
-AT_BANNER([FREQUENCIES procedure])
+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl 
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+dnl AT_BANNER([FREQUENCIES procedure])
 
 AT_SETUP([FREQUENCIES string variable])
 AT_DATA([frequencies.sps],
@@ -641,7 +656,36 @@ Percentiles,50 (Median),2.00
 ])
 AT_CLEANUP
 
+AT_SETUP([FREQUENCIES variance])
+AT_DATA([variance.sps], [dnl
+data list notable list /forename (A12) height.
+begin data.
+Ahmed 188
+bertram 167
+Catherine 134
+David 109
+end data.
+
+FREQUENCIES
+   /VARIABLES = height
+   /STATISTICS = VARIANCE.
+])
 
+AT_CHECK([pspp variance.sps -O format=csv], [0],  [dnl
+Table: height
+Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
+,109.00,1,25.00,25.00,25.00
+,134.00,1,25.00,25.00,50.00
+,167.00,1,25.00,25.00,75.00
+,188.00,1,25.00,25.00,100.00
+Total,,4,100.0,100.0,
+
+Table: height
+N,Valid,4
+,Missing,0
+Variance,,1223.00
+])
+AT_CLEANUP
 
 AT_SETUP([FREQUENCIES default statistics])
 AT_DATA([median.sps], [dnl
@@ -761,3 +805,27 @@ FREQUENCIES
 AT_CHECK([pspp empty.sps -O format=csv], [0],  [ignore])
 
 AT_CLEANUP
+
+AT_SETUP([FREQUENCIES percentiles + histogram bug#48128])
+AT_DATA([bug.sps], [dnl
+SET FORMAT=F8.0.
+
+INPUT PROGRAM.
+       LOOP I=1 TO 10.
+               COMPUTE SCORE=EXP(NORMAL(1)).
+               END CASE.
+       END LOOP.
+       END FILE.
+END INPUT PROGRAM.
+
+FREQUENCIES VARIABLES=SCORE
+/FORMAT=NOTABLE
+/STATISTICS=ALL
+/PERCENTILES=1 10 20 30 40 50 60 70 80 90 99
+/HISTOGRAM.
+
+])
+
+AT_CHECK([pspp bug.sps], [0],  [ignore])
+
+AT_CLEANUP