3 # This crashed older versions of PSPP (bug #30682).
4 AT_SETUP([SET FORMAT to invalid output format])
5 AT_DATA([set.pspp], [dnl
6 DATA LIST LIST NOTABLE /x.
15 AT_CHECK([pspp -O format=csv set.pspp], [1], [dnl
16 "set.pspp:7: error: SET: Output format F41.0 specifies width 41, but F requires a width between 1 and 40."
18 Table: Valid cases = 3; cases with missing value(s) = 0.
19 Variable,N,Mean,Std Dev,Minimum,Maximum
20 x,3,2.00,1.00,1.00,3.00
26 AT_SETUP([SET MXWARNS])
27 dnl Make sure that syntax processing stops and that
28 dnl a warning is issued when the MXWARNS figure is
30 AT_DATA([set.pspp], [dnl
32 data list notable list /x (f8.2) y (f8.2).
43 comment The following line should not be executed.
47 AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl
48 set.pspp:5.3: warning: Data for variable y is not valid as format F: Field contents are not numeric.
50 set.pspp:6.3: warning: Data for variable y is not valid as format F: Field contents are not numeric.
52 set.pspp:7.1: warning: Data for variable x is not valid as format F: Field contents are not numeric.
54 note: Warnings (3) exceed limit (2). Syntax processing will be halted.
62 AT_SETUP([SET MXWARNS special case zero])
63 dnl Make sure that MXWARNS interprets zero as infinity.
64 AT_DATA([mxwarns.pspp], [dnl
66 data list notable list /x (f8.2) y (f8.2) z *.
80 AT_CHECK([pspp -O format=csv mxwarns.pspp], [0],
81 [warning: MXWARNS set to zero. No further warnings will be given even when potentially problematic situations are encountered.
96 AT_BANNER([PRESERVE and RESTORE])
98 AT_SETUP([PRESERVE of SET FORMAT])
99 AT_DATA([set.pspp], [dnl
107 AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl
108 set.pspp:1: note: SHOW: FORMAT is F8.2.
110 set.pspp:5: note: SHOW: FORMAT is F10.0.
112 set.pspp:6: note: SHOW: FORMAT is F8.2.