Squashed 'third_party/lisp/quasiquote_2/' content from commit cac90875d1
git-subtree-dir: third_party/lisp/quasiquote_2 git-subtree-split: cac90875d1f66e9385e559bfebafe6b7808b0930
This commit is contained in:
commit
47f60d0996
8 changed files with 895 additions and 0 deletions
21
tests-macro.lisp
Normal file
21
tests-macro.lisp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
(in-package #:quasiquote-2.0-tests)
|
||||
|
||||
(in-suite quasiquote-2.0)
|
||||
|
||||
(enable-quasiquote-2.0)
|
||||
|
||||
(defmacro define-sample-macro (name args &body body)
|
||||
`(defmacro ,name ,args
|
||||
`(sample-thing-to-macroexpand-to
|
||||
,,@body)))
|
||||
|
||||
(define-sample-macro sample-macro-1 (x y)
|
||||
,x ,y)
|
||||
|
||||
(define-sample-macro sample-macro-2 (&body body)
|
||||
,@body)
|
||||
|
||||
(test macro-defined-macroexpansions
|
||||
(is (equal '(sample-thing-to-macroexpand-to a b) (macroexpand-1 '(sample-macro-1 a b))))
|
||||
(is (equal '(sample-thing-to-macroexpand-to a b c) (macroexpand-1 '(sample-macro-2 a b c)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue