X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fcontrol%2Fdefine.at;fp=tests%2Flanguage%2Fcontrol%2Fdefine.at;h=acafa4b4ea94bd9b53655971eb46b2b7df458017;hb=a4a5dfabf4309e73a3508e1e257b6b53e4c8ecd6;hp=bbf3ba26fc5d85478393b97c1033d8d4c467a0c6;hpb=52d7c80a1a54c4946c4962399667c40200236bc3;p=pspp diff --git a/tests/language/control/define.at b/tests/language/control/define.at index bbf3ba26fc..acafa4b4ea 100644 --- a/tests/language/control/define.at +++ b/tests/language/control/define.at @@ -9,7 +9,7 @@ dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. +dnl GNU nGeneral Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . @@ -53,7 +53,7 @@ m(n, o). "x "" y". ]) AT_CLEANUP - + PSPP_CHECK_MACRO_EXPANSION([one !TOKENS(1) positional argument], [DEFINE !t1(!positional !tokens(1)) t1 (!1) !ENDDEFINE.], [!t1 a. @@ -63,7 +63,7 @@ PSPP_CHECK_MACRO_EXPANSION([one !TOKENS(1) positional argument], t1(b) t1(a) note: unexpanded token "b"]) - + AT_SETUP([macro expansion with positional arguments]) AT_DATA([define.sps], [dnl DEFINE !title(!positional !tokens(1)) !1 !ENDDEFINE. @@ -180,7 +180,7 @@ p(a, b, c) (a b c) p(1, -2, -3) (1 -2 -3) ]) AT_CLEANUP - + AT_SETUP([macro expansion with positional arguments - negative]) AT_DATA([define.sps], [dnl DEFINE !title(!positional !tokens(1)) !1 !ENDDEFINE. @@ -549,4 +549,18 @@ DEFINE !m(!POSITIONAL !TOKENS(1) !m '' 'b'. ], [123 b / 5 / 3 b / '123 b'. 2 3 / 3 / 3 / '2 3'. -'' 'b' / 6 / 'b' / ''''' ''b'''.]) \ No newline at end of file +'' 'b' / 6 / 'b' / ''''' ''b'''.]) + +AT_SETUP([macro maximum nesting level (MNEST)]) +AT_KEYWORDS([MNEST]) +AT_DATA([define.sps], [dnl +DEFINE !macro() +!macro +!ENDDEFINE. +!macro. +]) +AT_CHECK([pspp define.sps], [1], [dnl +maximum nesting level exceeded +define.sps.1: error: Syntax error at `!macro': expecting command name. +]) +AT_CLEANUP \ No newline at end of file