fix WXME stream write-bytes' and write' method results

This commit is contained in:
Matthew Flatt 2011-03-27 16:30:44 -06:00
parent 84ad491837
commit 6e1f35a319
2 changed files with 4 additions and 3 deletions

View File

@ -180,7 +180,8 @@
(def/override (write-bytes [bytes? v]
[exact-nonnegative-integer? [start 0]]
[exact-nonnegative-integer? [end (bytes-length v)]])
(write-bytes-proc v port start end)))
(write-bytes-proc v port start end)
(void)))
(defclass editor-stream-out-file-base% editor-stream-out-port-base%
(super-new))

View File

@ -668,11 +668,11 @@
(define fbo (make-object editor-stream-out-bytes-base%))
(expect (send fbo tell) 0)
(expect (send fbo write-bytes #"abc") 3)
(expect (send fbo write-bytes #"abc") (void))
(expect (send fbo tell) 3)
(expect (send fbo get-bytes) #"abc")
(send fbo seek 2)
(expect (send fbo write-bytes #"012345" 1 4) 3)
(expect (send fbo write-bytes #"012345" 1 4) (void))
(expect (send fbo tell) 5)
(expect (send fbo get-bytes) #"ab123")
(expect (send fbo bad?) #f)