fix 2htdp/image for text-only mode and add a test case that

covers improvements from 8fb8f56

original commit: e08ffde1b530975bd88c511bbf4f95ee4b829284
This commit is contained in:
Robby Findler 2014-04-06 08:37:23 -05:00
parent 79cbc62ea0
commit 6f0acc4b43

View File

@ -10,5 +10,8 @@
(class* object% (snip-reader<%>)
(define/public (read-header vers stream) (void))
(define/public (read-snip text? cvers stream)
(snipclass-bytes->image (send stream read-raw-bytes '2htdp/image)))
(define bytes (send stream read-raw-bytes '2htdp/image))
(if text?
#"."
(snipclass-bytes->image bytes)))
(super-new))))