MNEST
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 12 Jun 2021 19:15:33 +0000 (12:15 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 12 Jun 2021 19:15:33 +0000 (12:15 -0700)
tests/language/control/define.at

index bbf3ba26fc5d85478393b97c1033d8d4c467a0c6..acafa4b4ea94bd9b53655971eb46b2b7df458017 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
@@ -53,7 +53,7 @@ m(n, o).
 "x "" y".
 ])
 AT_CLEANUP
-\f
+
 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"])
-\f
+
 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
-\f
+
 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