test: when testing macroexpand, do not assume that quasiquote is a special
authorNicolas Boulenguez <nicolas.boulenguez@free.fr>
Sat, 25 May 2019 17:15:00 +0000 (19:15 +0200)
committerNicolas Boulenguez <nicolas.boulenguez@free.fr>
Sat, 25 May 2019 17:15:00 +0000 (19:15 +0200)
This allows to test rewritting quasiquote as a macro, and should
change nothing else in theory.

tests/step8_macros.mal

index 8cce8dc..9fee222 100644 (file)
@@ -12,7 +12,7 @@
 ;=>7
 (unless true 7 8)
 ;=>8
-(defmacro! unless2 (fn* (pred a b) `(if (not ~pred) ~a ~b)))
+(defmacro! unless2 (fn* (pred a b) (list 'if (list 'not pred) a b)))
 (unless2 false 7 8)
 ;=>7
 (unless2 true 7 8)