]> gitweb.factorcode.org Git - factor.git/commitdiff
Adding test for quasiquote
authorJames Cash <james.nvc@gmail.com>
Sun, 8 Jun 2008 02:32:54 +0000 (22:32 -0400)
committerJames Cash <james.nvc@gmail.com>
Wed, 11 Jun 2008 05:33:55 +0000 (01:33 -0400)
extra/lisp/lisp-tests.factor

index 14b91aa58ba25972eeaa47267f766794d6e83d18..9d85355f2e93b52fe2d392caac626b12c4f2a902 100644 (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