Change terminology from "active file" to "active dataset".
[pspp-builds.git] / tests / language / command.at
index f05086d1e7068f79697921333a503eaa518141e3..8d65b6fb8c2998bd14a27ee8d5f4d9f9b2174587 100644 (file)
@@ -1,3 +1,18 @@
+AT_BANNER([command parser])
+
+dnl Tests for a bug which crashed pspp when given certain invalid input.
+AT_SETUP([command parser crash bug])
+AT_DATA([command.sps], [dnl
+DATA rubbish.
+EXECUTE.
+])
+AT_CHECK([pspp -O format=csv command.sps], [1], [dnl
+command.sps:1: error: Unknown command `DATA rubbish'.
+
+command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined.
+])
+AT_CLEANUP
+
 AT_BANNER([ERASE])
 
 AT_SETUP([ERASE -- safer mode])
@@ -62,3 +77,14 @@ x
 15.00
 ])
 AT_CLEANUP
+
+AT_BANNER([COMMENT])
+
+dnl Tests for a bug wherein a comment just before end-of-file caused an
+dnl infinite loop.
+AT_SETUP([COMMENT at end of file])
+AT_DATA([comment.sps], [dnl
+COMMENT this is a comment at end of file.
+])
+AT_CHECK([pspp -O format=csv comment.sps])
+AT_CLEANUP