From bd08e09b125a0b3e0cebd36e621b18f3a8561dba Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 27 Feb 2012 07:58:13 -0600 Subject: [PATCH] fix up the repl test now that picts dont render as bitmaps (following up commits ad65164c5e2a36cfd0fcbae9a5703ff79c5dede5 and 72b9199976947a22fd9ef05522fe7ac955a95418) --- .../drracket/private/drracket-test-util.rkt | 6 ++++ collects/tests/drracket/private/repl-test.rkt | 28 +++++++++++-------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/collects/tests/drracket/private/drracket-test-util.rkt b/collects/tests/drracket/private/drracket-test-util.rkt index 7cf799c86a..3dd76c4cb2 100644 --- a/collects/tests/drracket/private/drracket-test-util.rkt +++ b/collects/tests/drracket/private/drracket-test-util.rkt @@ -562,6 +562,12 @@ (send snip get-text 0 (send snip get-count)) (send snip get-fraction-view)) strings))] + [;; this test is an approximation of + ;; (is-a? snip pict-snip%) from drracket/private/pict-snip% + (let ([sc (send snip get-snipclass)]) + (and sc (regexp-match #rx"pict-snip.rkt" (send sc get-classname)))) + (loop (send snip previous) + (cons "{pict-snip}" strings))] [else (loop (send snip previous) diff --git a/collects/tests/drracket/private/repl-test.rkt b/collects/tests/drracket/private/repl-test.rkt index 8ea002856d..3eea734a6a 100644 --- a/collects/tests/drracket/private/repl-test.rkt +++ b/collects/tests/drracket/private/repl-test.rkt @@ -904,17 +904,21 @@ This produces an ACK message (mktest "(require texpict/utils)(disk 3)" - ("{image}" - "{image}" - "{image}" - "{image}" - "{image}" - "{image}") + ("{pict-snip}" + "{pict-snip}" + "{pict-snip}" + "{pict-snip}" + "{pict-snip}" + "{pict-snip}") 'interactions #f void void) + ;; this test is kind of hokey in our current, module-based world + ;; we get images instead of snips because the image conversion code + ;; is in a library that's shared with the user, whereas the pict + ;; library isn't (I believe) (mktest (to-strings '(require texpict/utils) '(let () @@ -940,12 +944,12 @@ This produces an ACK message '(require texpict/utils) '(disk 3)) - ("{image}" - "{image}" - "{image}" - "{image}" - "{image}" - "{image}") + ("{pict-snip}" + "{pict-snip}" + "{pict-snip}" + "{pict-snip}" + "{pict-snip}" + "{pict-snip}") 'interactions #f void