X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fcommand.at;h=442355dbb63b1b2ba95cd17833ef9713392b79eb;hb=48b5268f2d9da96af106f09efd73ddddd96e5b09;hp=029e1b1fb9dab3f97899aca61f8730aac28e3073;hpb=3c7f102523ad679395c3baf023931ffe88f37d88;p=pspp diff --git a/tests/language/command.at b/tests/language/command.at index 029e1b1fb9..442355dbb6 100644 --- a/tests/language/command.at +++ b/tests/language/command.at @@ -7,12 +7,20 @@ DATA rubbish. EXECUTE. ]) AT_CHECK([pspp -O format=csv command.sps], [1], [dnl -command.sps:1: error: Unknown command DATA RUBBISH. +command.sps:1: error: Unknown command `DATA rubbish'. -command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active file has been defined. +command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. ]) 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 echo ; do true; done) | pspp], [0], [ignore], [ignore]) +AT_CLEANUP + AT_BANNER([ERASE]) AT_SETUP([ERASE -- safer mode]) @@ -77,3 +85,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