mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added tests from R7RS
This commit is contained in:
parent
cc75d7b44c
commit
b36640afda
1 changed files with 20 additions and 2 deletions
22
test.scm
22
test.scm
|
@ -23,8 +23,26 @@
|
|||
;(eval '(a 1))
|
||||
;(eval '(begin (define (a z) z) (a 1) (a 1)))
|
||||
|
||||
(Cyc-add-exception-handler (lambda (err) (write 'new-ex-handler)))
|
||||
(Cyc-remove-exception-handler)
|
||||
;(Cyc-add-exception-handler (lambda (err) (write 'new-ex-handler)))
|
||||
;(Cyc-remove-exception-handler)
|
||||
(write
|
||||
(call/cc
|
||||
(lambda (k)
|
||||
(with-exception-handler
|
||||
(lambda (x)
|
||||
(display "condition: ")
|
||||
(write x)
|
||||
;(newline)
|
||||
(k 'exception))
|
||||
(lambda ()
|
||||
(+ 1 (raise 'an-error)))))))
|
||||
|
||||
(with-exception-handler
|
||||
(lambda (x)
|
||||
(display "something went wrong\n"))
|
||||
(lambda ()
|
||||
(+ 1 (raise 'an-error))))
|
||||
|
||||
(define test '(a b))
|
||||
(set-car! test '(1 2 3))
|
||||
(write test)
|
||||
|
|
Loading…
Add table
Reference in a new issue