X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Futilities%2Fset.at;h=b6ff8187cdd126656c068a79f9bb75d5b567b13e;hb=e48391e8dee233d2bf5e30c5e9577757cb76af6d;hp=e1b92573f31e910e32540d3846d54e85fdf21a05;hpb=547d9160972dc6e986e1b4b1f29517f9c072410a;p=pspp diff --git a/tests/language/utilities/set.at b/tests/language/utilities/set.at index e1b92573f3..b6ff8187cd 100644 --- a/tests/language/utilities/set.at +++ b/tests/language/utilities/set.at @@ -1,3 +1,19 @@ +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 . +dnl AT_BANNER([SET]) # This crashed older versions of PSPP (bug #30682). @@ -15,13 +31,25 @@ DESCRIPTIVES /x. AT_CHECK([pspp -O format=csv set.pspp], [1], [dnl "set.pspp:7: error: SET: Output format F41.0 specifies width 41, but F requires a width between 1 and 40." -Table: Valid cases = 3; cases with missing value(s) = 0. -Variable,N,Mean,Std Dev,Minimum,Maximum +Table: Descriptive Statistics +,N,Mean,Std Dev,Minimum,Maximum x,3,2.00,1.00,1.00,3.00 +Valid N (listwise),3,,,, +Missing N (listwise),0,,,, ]) AT_CLEANUP +dnl This scenario was observed to erroneously free things twice +AT_SETUP([SET crash on invalid cc]) +AT_DATA([set.pspp], [dnl +SET CCA='xxxx'.SHGW CCA. +]) + +AT_CHECK([pspp -O format=csv set.pspp], [1], [ignore]) +AT_CLEANUP + + AT_SETUP([SET MXWARNS]) dnl Make sure that syntax processing stops and that @@ -45,11 +73,11 @@ list. ]) AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl -"set.pspp:5: warning: (column 3, F field) Field contents are not numeric." +set.pspp:5.3: warning: Data for variable y is not valid as format F: Field contents are not numeric. -"set.pspp:6: warning: (column 3, F field) Field contents are not numeric." +set.pspp:6.3: warning: Data for variable y is not valid as format F: Field contents are not numeric. -"set.pspp:7: warning: (column 1, F field) Field contents are not numeric." +set.pspp:7.1: warning: Data for variable x is not valid as format F: Field contents are not numeric. note: Warnings (3) exceed limit (2). Syntax processing will be halted. ]) @@ -92,3 +120,25 @@ x,y,z ]) AT_CLEANUP + + + +AT_BANNER([PRESERVE and RESTORE]) + +AT_SETUP([PRESERVE of SET FORMAT]) +AT_DATA([set.pspp], [dnl +SHOW FORMAT. +PRESERVE. +SET FORMAT F10.0. +SHOW FORMAT +RESTORE. +SHOW FORMAT. +]) +AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl +set.pspp:1: note: SHOW: FORMAT is F8.2. + +set.pspp:5: note: SHOW: FORMAT is F10.0. + +set.pspp:6: note: SHOW: FORMAT is F8.2. +]) +AT_CLEANUP