1 AT_BANNER([INPUT PROGRAM])
3 dnl Tests for a bug which caused a crash when
4 dnl reading invalid INPUT PROGRAM syntax.
5 AT_SETUP([INPUT PROGRAM invalid syntax crash])
6 AT_DATA([input-program.sps], [dnl
8 DATA LIST NOTABLE /a 1-9.
14 AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl
15 input-program.sps:3: error: BEGIN DATA: BEGIN DATA is not allowed inside INPUT PROGRAM.
19 dnl Tests for bug #21108, a crash when
20 dnl reading invalid INPUT PROGRAM syntax.
21 AT_SETUP([INPUT PROGRAM invalid syntax crash])
22 AT_DATA([input-program.sps], [dnl
24 DATA LIST LIST NOTABLE /x.
30 AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl
31 error: DESCRIPTIVES: Syntax error at end of input: expecting BEGIN.
35 dnl Tests for bug #38782, an infinite loop processing an empty input program.
36 AT_SETUP([INPUT PROGRAM infinite loop])
37 AT_DATA([input-program.sps], [dnl
39 STRING firstname lastname (a24) / address (a80).
43 AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl
44 input-program.sps:3: error: Input program must contain DATA LIST or END FILE.
46 input-program.sps:4: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined.
50 dnl Tests for bug #39097, a bug when an INPUT PROGRAM used VECTOR, was
51 dnl followed immediately by a call to proc_execute() (here via DATASET
52 dnl COPY), and then the input was actually used.
53 AT_SETUP([INPUT PROGRAM with VECTOR and EXECUTE])
54 AT_DATA([input-program.sps], [dnl
68 AT_CHECK([pspp -O format=csv input-program.sps], [0], [dnl
70 vec1,vec2,vec3,vec4,vec5
71 1.00,2.00,3.00,4.00,5.00
72 1.00,2.00,3.00,4.00,5.00
73 1.00,2.00,3.00,4.00,5.00
74 1.00,2.00,3.00,4.00,5.00
75 1.00,2.00,3.00,4.00,5.00
76 1.00,2.00,3.00,4.00,5.00
77 1.00,2.00,3.00,4.00,5.00
78 1.00,2.00,3.00,4.00,5.00
79 1.00,2.00,3.00,4.00,5.00
80 1.00,2.00,3.00,4.00,5.00