1 AT_BANNER([command parser])
3 dnl Tests for a bug which crashed pspp when given certain invalid input.
4 AT_SETUP([command parser crash bug])
5 AT_DATA([command.sps], [dnl
9 AT_CHECK([pspp -O format=csv command.sps], [1], [dnl
10 command.sps:1: error: Unknown command `DATA rubbish'.
12 command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined.
18 AT_SETUP([ERASE -- safer mode])
19 AT_DATA([foobar], [contents
21 AT_DATA([erase.sps], [dnl
26 AT_CHECK([pspp -O format=csv erase.sps], [1], [dnl
27 erase.sps:3: error: ERASE: This command not allowed when the SAFER option is set.
29 AT_CHECK([cat foobar], [0], [contents
33 AT_SETUP([ERASE -- not safer mode])
34 AT_DATA([foobar], [contents
36 AT_CHECK([test -e foobar])
37 AT_DATA([erase.sps], [dnl
40 AT_CHECK([pspp -O format=csv erase.sps])
41 AT_CHECK([test ! -e foobar])
44 AT_BANNER([N OF CASES])
46 AT_SETUP([N OF CASES])
47 AT_DATA([n-of-cases.sps], [dnl
60 AT_CHECK([pspp -O format=csv n-of-cases.sps], [0], [dnl
83 dnl Tests for a bug wherein a comment just before end-of-file caused an
85 AT_SETUP([COMMENT at end of file])
86 AT_DATA([comment.sps], [dnl
87 COMMENT this is a comment at end of file.
89 AT_CHECK([pspp -O format=csv comment.sps])