Tk Source Code

Check-in [b10dfadf]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed failing textImage-3.2 test - See bug [1591493fff]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b10dfadfc8eda1c162f592e6609c7aa2e8f89bc2
User & Date: fvogel 2015-02-15 19:20:37
Context
2015-02-16
20:19
Major fix for HITheme button metrics; thanks to Marc Culler for patch. check-in: ef130fef user: kevin_walzer tags: trunk
2015-02-15
19:20
Fixed failing textImage-3.2 test - See bug [1591493fff] check-in: b10dfadf user: fvogel tags: trunk
19:16
Fixed failing textImage-3.2 test - See bug [1591493fff] check-in: f4006c84 user: fvogel tags: core-8-5-branch
19:14
Merge mark check-in: 00f6df38 user: fvogel tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/textImage.test.

312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

332
333
334
335

336
337
338
339
340
341
342
343
344
345
346
    } 
    return $result
} -cleanup {
    destroy .t
    image delete vary
} -result {{base:0 0 5 5} {10:0 0 10 10} {20:0 0 20 20} {40:0 0 40 40}}

# Fails in some environments (both in Linux and winXP)
test textImage-3.2 {delayed image management} -setup {
    destroy .t
    set result ""
} -body {
    catch {
        image create photo small -width 5 -height 5
        small put red -to 0 0 4 4
    }
    text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
    pack .t
    .t image create end -name test
    update

    lappend result [.t bbox test]
    .t image configure test -image small -align top
    update
    lappend result [.t bbox test]

} -cleanup {
    destroy .t
    image delete small
} -result {{} {0 0 5 5}}


# some temporary random tests

test textImage-4.1 {alignment checking - except baseline} -setup {
    destroy .t
    set result ""






<
|











>
|


|
>



|







312
313
314
315
316
317
318

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
    } 
    return $result
} -cleanup {
    destroy .t
    image delete vary
} -result {{base:0 0 5 5} {10:0 0 10 10} {20:0 0 20 20} {40:0 0 40 40}}


test textImage-3.2 {delayed image management, see also bug 1591493} -setup {
    destroy .t
    set result ""
} -body {
    catch {
        image create photo small -width 5 -height 5
        small put red -to 0 0 4 4
    }
    text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
    pack .t
    .t image create end -name test
    update
    foreach {x1 y1 w1 h1} [.t bbox test] {}
    lappend result [list $x1 $w1 $h1]
    .t image configure test -image small -align top
    update
    foreach {x2 y2 w2 h2} [.t bbox test] {}
    lappend result [list [expr {$x1==$x2}] [expr {$w2>0}] [expr {$h2>0}]]
} -cleanup {
    destroy .t
    image delete small
} -result {{0 0 0} {1 1 1}}


# some temporary random tests

test textImage-4.1 {alignment checking - except baseline} -setup {
    destroy .t
    set result ""