more port-read-handler tests

svn: r4753
This commit is contained in:
Matthew Flatt 2006-11-02 21:35:49 +00:00
parent c3c82e304d
commit 03ffe8ec6e

View File

@ -646,8 +646,15 @@
(arity-test (port-read-handler ui) 1 2)
(err/rt-test ((port-read-handler ui) 8))
(let ([old (port-read-handler ui)])
(port-read-handler ui (case-lambda [(x) "hello"][(x y) "goodbye"]))
(port-read-handler ui (case-lambda [(x) "hello"][(x y) #'"goodbye"]))
(test "hello" read ui)
(test "goodbye" syntax-e (read-syntax 'x ui))
(port-read-handler ui old)
(test "" read ui))
(let ([old (port-read-handler ui)])
(port-read-handler ui (case-lambda [(x) eof][(x y) eof]))
(test eof read ui)
(test eof read-syntax 'x ui)
(port-read-handler ui old)
(test "" read ui))
(arity-test port-read-handler 1 2)