Skip to content

Commit 579ff41

Browse files
committed
Test macro constructor errors on no args
1 parent 71dbfd3 commit 579ff41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test.ls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,10 @@ test "when returned from an IIFE, macros can share state" ->
725725
"""
726726
..`@equals` "2;\n4;"
727727

728+
test "macro constructor called with no arguments is an error" ->
729+
-> esl "(macro)"
730+
..`@throws` Error
731+
728732
test "macro can return multiple statements with `multi`" ->
729733
esl "(macro declareTwo (function () (return ((. this multi) '(var x 0) '(var y 1)))))
730734
(declareTwo)"

0 commit comments

Comments
 (0)