Adding test for quasiquote

db4
James Cash 2008-06-07 22:32:54 -04:00
parent d7e8d65d81
commit 3d09e6f82f
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
! Copyright (C) 2008 James Cash
! See http://factorcode.org/license.txt for BSD license.
USING: lisp lisp.parser tools.test sequences math kernel parser arrays ;
USING: lisp lisp.parser tools.test sequences math kernel parser arrays lists ;
IN: lisp.test
@ -29,6 +29,10 @@ IN: lisp.test
"((lambda (x y z) (+ x (- y z))) 40 3 1)" lisp-eval
] unit-test
{ { 1 2 3 4 } } [
"((lambda (x y) (quasiquote (1 (unquote x) 3 (unquote y)))) 2 4)" lisp-eval list>seq
] unit-test
{ T{ lisp-symbol f "if" } } [
"(defmacro if (pred tr fl) (quasiquote (cond ((unquote pred) (unquote tr)) (#t (unquote fl)))))" lisp-eval
] unit-test