DESCRIPTIVES: Fix bad error message.
[pspp] / tests / language / stats / descriptives.at
index 60ec213097d8a2bf41c901c2c5d8596e4e251174..8a1c26a7d472af03fa8c2b8efdef2d9f944ea10c 100644 (file)
@@ -1,16 +1,16 @@
 dnl PSPP - a program for statistical analysis.
 dnl Copyright (C) 2017 Free Software Foundation, Inc.
-dnl 
+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
 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
 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
@@ -39,23 +39,23 @@ descript all/stat=all/format=serial.
 AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl
 Table: Reading 1 record from INLINE.
 Variable,Record,Columns,Format
-V0,1,1-  1,F1.0
-V1,1,2-  2,F1.0
-V2,1,3-  3,F1.0
-V3,1,4-  4,F1.0
-V4,1,5-  5,F1.0
-V5,1,6-  6,F1.0
-V6,1,7-  7,F1.0
-V7,1,8-  8,F1.0
-V8,1,9-  9,F1.0
-V9,1,10- 10,F1.0
-V10,1,11- 11,F1.0
-V11,1,12- 12,F1.0
-V12,1,13- 13,F1.0
-V13,1,14- 14,F1.0
-V14,1,15- 15,F1.0
-V15,1,16- 16,F1.0
-V16,1,17- 17,F1.0
+V0,1,1-1,F1.0
+V1,1,2-2,F1.0
+V2,1,3-3,F1.0
+V3,1,4-4,F1.0
+V4,1,5-5,F1.0
+V5,1,6-6,F1.0
+V6,1,7-7,F1.0
+V7,1,8-8,F1.0
+V8,1,9-9,F1.0
+V9,1,10-10,F1.0
+V10,1,11-11,F1.0
+V11,1,12-12,F1.0
+V12,1,13-13,F1.0
+V13,1,14-14,F1.0
+V14,1,15-15,F1.0
+V15,1,16-16,F1.0
+V16,1,17-17,F1.0
 
 Table: Descriptive Statistics
 ,N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum
@@ -86,8 +86,8 @@ m4_define([DESCRIPTIVES_MISSING_DATA],
 mis val v1 to v3 (1).
 begin data.
 111
-   
- 1 
+
+ 1
 1 1
 112
 123
@@ -442,3 +442,21 @@ Valid N (listwise),40,,,,
 Missing N (listwise),0,,,,
 ])
 AT_CLEANUP
+
+dnl Check for regression for a bad error message that cited the
+dnl token following the bad statistic name.
+AT_SETUP([DESCRIPTIVES -- negative])
+AT_DATA([descriptives.sps], [dnl
+DATA LIST NOTABLE/V0 to V16 1-17.
+BEGIN DATA.
+12128989012389023
+END DATA.
+DESCRIPTIVES ALL/STATISTICS=COUNT MEAN.
+])
+AT_CHECK([pspp descriptives.sps], [1], [dnl
+descriptives.sps:5.29-5.33: error: DESCRIPTIVES: Syntax error at `COUNT':
+expecting statistic name: reverting to default.
+
+descriptives.sps:5.35-5.38: error: DESCRIPTIVES: Syntax error at `MEAN'.
+])
+AT_CLEANUP