From f6c615ba30470c7155226a3a3b44829cd625b397 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 29 May 2015 18:28:06 -0400 Subject: [PATCH] Added quasi-quote tests --- tests/unit-tests.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit-tests.scm b/tests/unit-tests.scm index f56ea960..14dcec06 100644 --- a/tests/unit-tests.scm +++ b/tests/unit-tests.scm @@ -17,6 +17,11 @@ (assert "Testing assert function" #t) (assert "Testing assert function" 1) +;; Quotation / Quasi-quotes +(assert:equal "quasi-quote #1" `(read ,(+ 1 2 3)) '(read 6)) +(assert:equal "quasi-quote #2" `(read ,(list 1 2 3)) '(read (1 2 3))) +(assert:equal "quasi-quote splicing" `(read ,@(list 1 2 3)) '(read 1 2 3)) + ;; Lists (define l (list 'a 'b 'c)) ; TODO: seems to break eval below, is there a GC problem with a circular list?