fix `image-snip%' unmarshaling with filename

Merge to 5.1

original commit: c2c6c79a15b12d2ca689a75ed519f1fb364e1fd8
This commit is contained in:
Matthew Flatt 2011-02-02 19:00:27 -07:00
parent 5d1df3d05d
commit f0f7137803

View File

@ -1347,4 +1347,23 @@
;; ----------------------------------------
(let ()
(define (mk) (make-object image-snip% (collection-file-path "b-run.png" "icons") 'unknown #f #f))
(define is (mk))
(define copy-is
(let ()
(define sp (open-output-string))
(define t (new text%))
(send t insert (mk))
(send t save-port sp)
(define t2 (new text%))
(send t2 insert-port (open-input-string (get-output-string sp)))
(send t2 find-first-snip)))
(expect (send (mk) get-filename)
(send copy-is get-filename)))
;; ----------------------------------------
(done)