test: Add psyntax closure tests.

* tests/closure.test (closure 7, closure 8, closure 9): New test.
This commit is contained in:
Jan Nieuwenhuizen 2016-11-08 21:05:01 +01:00
parent 07778d3b70
commit adbf1bb296
1 changed files with 18 additions and 0 deletions

View File

@ -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)