From f0f7137803d1b5197ce434da4a45e53655c73c98 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 19:00:27 -0700 Subject: [PATCH] fix `image-snip%' unmarshaling with filename Merge to 5.1 original commit: c2c6c79a15b12d2ca689a75ed519f1fb364e1fd8 --- collects/tests/gracket/wxme.rkt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/collects/tests/gracket/wxme.rkt b/collects/tests/gracket/wxme.rkt index 4208af35..c436b39f 100644 --- a/collects/tests/gracket/wxme.rkt +++ b/collects/tests/gracket/wxme.rkt @@ -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)