Skip to content

Commit

Permalink
Add some tests of macroexpand-all
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodiologist committed Dec 13, 2024
1 parent eae1b13 commit 8843afc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test_macrotools.hy
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,17 @@
'f"{(a 1)}"))

(assert (= (get (macroexpand-all '(require-macro)) -1)
'(setv blah 1))))
'(setv blah 1)))

; Check quoting.
(assert (= (macroexpand-all ''(foo-walk))
''(foo-walk)))
(assert (= (macroexpand-all `(do (foo-walk)))
'(do 42)))
(assert (= (macroexpand-all '`(do (foo-walk)))
'`(do (foo-walk))))
(assert (= (macroexpand-all '`(do ~(foo-walk)))
'`(do ~42))))


(defn test-map-hyseq []
Expand Down

0 comments on commit 8843afc

Please sign in to comment.