test: Add psyntax closure tests.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 8 Nov 2016 20:05:01 +0000 (21:05 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 12 Dec 2016 19:33:50 +0000 (20:33 +0100)
* tests/closure.test (closure 7, closure 8, closure 9): New test.

tests/closure.test

index 3a1be01ab6fa417873ed62fbf8dbd2e39308a460..59baf5ff2dca3b234cbe987abeecd3e564c3e7f4 100755 (executable)
@@ -79,4 +79,22 @@ exit $?
             ((foo)))
                #t))
 
+(define-macro (foo? q+q)
+  #t)
+(foo? 'cons)
+(pass-if-equal "closure 7" #f (defined? 'q+q))
+
+(let ((x 0))
+  (pass-if-equal "closure 8" #f (not (defined? 'x))))
+
+((lambda ()
+   (define sc-expand #f)
+   ((lambda (g38)
+      (set! sc-expand
+            ((lambda ()
+               (lambda ()
+                 (list g38))))))
+    "noexpand")
+   (pass-if "closure 9" (sc-expand))))
+
 (result 'report)