fix ascii-art-enlarge-mode tests
This commit is contained in:
parent
18404570dd
commit
1df6383e3c
|
@ -755,20 +755,22 @@
|
||||||
(define after (get-colors))
|
(define after (get-colors))
|
||||||
(list before after)))))
|
(list before after)))))
|
||||||
|
|
||||||
(define (test-ascii-art-enlarge-boxes-mixin name before position overwrite? after)
|
(define (test-ascii-art-enlarge-boxes-mixin name before position overwrite? chars after)
|
||||||
(test
|
(test
|
||||||
name
|
name
|
||||||
(λ (got) (equal? got after))
|
(λ (got) (equal? got after))
|
||||||
(λ ()
|
(λ ()
|
||||||
(queue-sexp-to-mred
|
(queue-sexp-to-mred
|
||||||
`(let ([t (new (ascii-art-enlarge-boxes-mixin text%))])
|
`(let ([t (new (text:ascii-art-enlarge-boxes-mixin text%))])
|
||||||
|
(send t set-ascii-art-enlarge #t)
|
||||||
(define f (new frame% [label ""]))
|
(define f (new frame% [label ""]))
|
||||||
(define ec (new editor-canvas% [parent f] [editor t]))
|
(define ec (new editor-canvas% [parent f] [editor t]))
|
||||||
(send t insert
|
(send t insert
|
||||||
,before)
|
,before)
|
||||||
(send t set-position ,position ,position)
|
(send t set-position ,position ,position)
|
||||||
,@(if overwrite? (list '(send t set-overwrite-mode #t)) '())
|
,@(if overwrite? (list '(send t set-overwrite-mode #t)) '())
|
||||||
(send ec on-char (new key-event% [key-code #\a]))
|
,@(for/list ([char (in-list chars)])
|
||||||
|
`(send ec on-char (new key-event% [key-code ,char])))
|
||||||
(send t get-text))))))
|
(send t get-text))))))
|
||||||
|
|
||||||
|
|
||||||
|
@ -779,7 +781,7 @@
|
||||||
"╠═╬═╣\n"
|
"╠═╬═╣\n"
|
||||||
"║ ║ ║\n"
|
"║ ║ ║\n"
|
||||||
"╚═╩═╝\n")
|
"╚═╩═╝\n")
|
||||||
7 #t
|
7 #t '(#\a)
|
||||||
(string-append
|
(string-append
|
||||||
"╔═╦═╗\n"
|
"╔═╦═╗\n"
|
||||||
"║a║ ║\n"
|
"║a║ ║\n"
|
||||||
|
@ -794,7 +796,7 @@
|
||||||
"╠═╬═╣\n"
|
"╠═╬═╣\n"
|
||||||
"║ ║ ║\n"
|
"║ ║ ║\n"
|
||||||
"╚═╩═╝\n")
|
"╚═╩═╝\n")
|
||||||
7 #t
|
7 #t'(#\a #\b)
|
||||||
(string-append
|
(string-append
|
||||||
"╔══╦═╗\n"
|
"╔══╦═╗\n"
|
||||||
"║ab║ ║\n"
|
"║ab║ ║\n"
|
||||||
|
@ -809,7 +811,7 @@
|
||||||
"╠═╬═╣\n"
|
"╠═╬═╣\n"
|
||||||
"║ ║ ║\n"
|
"║ ║ ║\n"
|
||||||
"╚═╩═╝\n")
|
"╚═╩═╝\n")
|
||||||
7 #f
|
7 #f '(#\a)
|
||||||
(string-append
|
(string-append
|
||||||
"╔══╦═╗\n"
|
"╔══╦═╗\n"
|
||||||
"║a ║ ║\n"
|
"║a ║ ║\n"
|
||||||
|
@ -825,7 +827,7 @@
|
||||||
"╠═╬═╣\n"
|
"╠═╬═╣\n"
|
||||||
"║ ║ ║\n"
|
"║ ║ ║\n"
|
||||||
"╚═╩═╝\n")
|
"╚═╩═╝\n")
|
||||||
14 #f
|
14 #f '(#\f)
|
||||||
(string-append
|
(string-append
|
||||||
"╔══╦═╗\n"
|
"╔══╦═╗\n"
|
||||||
"║ ║ ║\n"
|
"║ ║ ║\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user