scribble/eval: fix contract for scribble-exn->string
This commit is contained in:
parent
6587e4f5ea
commit
8a85572679
|
@ -44,7 +44,7 @@
|
|||
(-> any/c any)]
|
||||
|
||||
[scribble-exn->string
|
||||
(-> any/c string?)]
|
||||
(parameter/c (-> any/c string?))]
|
||||
[scribble-eval-handler
|
||||
(parameter/c (-> (-> any/c any) boolean? any/c any))]
|
||||
[make-log-based-eval
|
||||
|
|
|
@ -32,10 +32,27 @@
|
|||
(check-exn blames-this-module?
|
||||
(λ () (make-eval-factory '() #:lang '(+ 2 2))))
|
||||
|
||||
(check-exn blames-this-module?
|
||||
(λ () (scribble-exn->string #f)))
|
||||
(check-exn blames-this-module?
|
||||
(λ () (scribble-exn->string (λ (a b c) a))))
|
||||
(check-not-exn
|
||||
(λ () (scribble-exn->string)))
|
||||
(check-not-exn
|
||||
(λ ()
|
||||
(parameterize ((scribble-exn->string (λ (a) "hello")))
|
||||
((scribble-exn->string) "error"))))
|
||||
|
||||
(check-exn blames-this-module?
|
||||
(λ () (scribble-eval-handler #f)))
|
||||
(check-exn blames-this-module?
|
||||
(λ () (scribble-eval-handler (λ (ev t) t))))
|
||||
(check-not-exn
|
||||
(λ () (scribble-eval-handler)))
|
||||
(check-not-exn
|
||||
(λ ()
|
||||
(parameterize ((scribble-eval-handler (λ (a b c) c)))
|
||||
((scribble-eval-handler) (λ (x) x) #f #true))))
|
||||
|
||||
(check-exn blames-this-module?
|
||||
(λ () (make-log-based-eval #f 'record)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user