(reading): Test bad # error message is formattable.
This commit is contained in:
parent
dd72382c32
commit
b7d22e033c
1 changed files with 14 additions and 1 deletions
|
|
@ -18,7 +18,20 @@
|
|||
(pass-if "1+i+i"
|
||||
(equal? (read-string "1+i+i") '1+i+i))
|
||||
(pass-if "1+e10000i"
|
||||
(equal? (read-string "1+e10000i") '1+e10000i)))
|
||||
(equal? (read-string "1+e10000i") '1+e10000i))
|
||||
|
||||
;; At one time the arg list for "Unknown # object: ~S" didn't make it out
|
||||
;; of read.c. Check that `format' can be applied to this error.
|
||||
(pass-if "error message on bad #"
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(read-string "#ZZZ")
|
||||
;; oops, this # is supposed to be unrecognised
|
||||
#f)
|
||||
(lambda (key subr message args rest)
|
||||
(apply format #f message args)
|
||||
;; message and args are ok
|
||||
#t))))
|
||||
|
||||
(pass-if-exception "radix passed to number->string can't be zero"
|
||||
exception:out-of-range
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue