X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Flexer%2Fsegment.at;h=8f82dd2e6e13f05b08dd11cfc9af43e0ca730dfe;hb=6467d294ac5750d7ee060f5c4e0291275ece238d;hp=54520717c7ca96f6d74c91210ecb70156260e045;hpb=29750abbb77e892f937b6551984df1952b4163a1;p=pspp diff --git a/tests/language/lexer/segment.at b/tests/language/lexer/segment.at index 54520717c7..8f82dd2e6e 100644 --- a/tests/language/lexer/segment.at +++ b/tests/language/lexer/segment.at @@ -1295,6 +1295,33 @@ identifier x end_command . newline \n (first) +identifier data space +identifier list space +punct / +identifier x space +number 1 +end_command . +-newline \n (first) +- +end +]) +PSPP_CHECK_SEGMENT([-i]) +AT_CLEANUP + +AT_SETUP([DEFINE command - early end of command 4]) +AT_KEYWORDS([segment]) +AT_DATA([input], [dnl +dnl Notice the command terminator at the end of the DEFINE command, +dnl which should not be there and ends it early. +define !macro1. +data list /x 1. +]) +AT_DATA([expout-base], [dnl +identifier define space +macro_id !macro1 +end_command . +newline \n (first) + identifier data space identifier list space punct / @@ -1311,7 +1338,7 @@ AT_CLEANUP AT_SETUP([DEFINE command - missing !ENDDEFINE]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl -define !macro1(). +define !macro1() content line 1 content line 2 ]) @@ -1320,7 +1347,6 @@ identifier define space macro_id !macro1 punct ( punct ) -end_command . newline \n (DEFINE) macro_body content_line_1