command: Fix delayed execution of FINISH.
[pspp] / tests / language / command.at
index 8d65b6fb8c2998bd14a27ee8d5f4d9f9b2174587..ae91558ce14965b19950150da347153a390d8b90 100644 (file)
@@ -13,6 +13,14 @@ command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active dataset
 ])
 AT_CLEANUP
 
+dnl Tests for a bug where FINISH or EXIT wasn't executed until the lexer
+dnl read the first token of the next command.
+dnl
+dnl (If this reecurs, the the test will run forever.)
+AT_SETUP([FINISH executes immediately])
+AT_CHECK([(echo "FINISH."; while :; do echo; done) | pspp])
+AT_CLEANUP
+
 AT_BANNER([ERASE])
 
 AT_SETUP([ERASE -- safer mode])