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/>.
"x "" y".
])
AT_CLEANUP
-\f
+
PSPP_CHECK_MACRO_EXPANSION([one !TOKENS(1) positional argument],
[DEFINE !t1(!positional !tokens(1)) t1 (!1) !ENDDEFINE.],
[!t1 a.
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.
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.
!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