Tk Source Code

Artifact [896ea9d6]
Login

Artifact 896ea9d6b139cb459053fb43bfb2693f6813245678a8c6a0ccce83f0636a0665:

Attachment "tkTextDisp_failures_15Oct2017.txt" to ticket [fab5fed6] added by fvogel 2017-10-15 18:19:10.
==== textDisp-4.8 UpdateDisplayInfo, filling in extra vertical space FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
    .t yview 16.0
    update
    .t delete 5.0 14.0
    update
    set x [list [.t index @0,0] $tk_textRelayout $tk_textRedraw]

---- Result was:
1.0 {} {borders 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 eof}
---- Result should have been (exact matching):
1.0 {5.0 4.0 3.0 2.0 1.0} {1.0 2.0 3.0 4.0 5.0 eof}
==== textDisp-4.8 FAILED


==== textDisp-4.10 UpdateDisplayInfo, filling in extra vertical space FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert end "1\n2\n3\n4\n5\nLine 6 is such a long line that it wraps around.\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
    .t yview end
    update
    .t delete 13.0 end
    update
    list [.t index @0,0] $tk_textRelayout $tk_textRedraw

---- Result was:
5.0 {} {borders 5.0 6.0 6.20 6.40 7.0 8.0 9.0 10.0 11.0 12.0}
---- Result should have been (exact matching):
5.0 {12.0 7.0 6.40 6.20 6.0 5.0} {5.0 6.0 6.20 6.40 7.0 12.0}
==== textDisp-4.10 FAILED



==== textDisp-4.11 UpdateDisplayInfo, filling in extra vertical space FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert end "1\n2\n3\n4\n5\nLine 6 is such a long line that it wraps around, not once but really quite a few times.\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
    .t yview end
    update
    .t delete 14.0 end
    update
    list [.t index @0,0] $tk_textRelayout $tk_textRedraw

---- Result was:
6.40 {} {borders 6.40 6.60 6.80 7.0 8.0 9.0 10.0 11.0 12.0 13.0}
---- Result should have been (exact matching):
6.40 {13.0 7.0 6.80 6.60 6.40} {6.40 6.60 6.80 7.0 13.0}
==== textDisp-4.11 FAILED


==== textDisp-4.13 UpdateDisplayInfo, special handling for top/bottom lines FAILED
==== Contents of test case:

    .t tag add x 1.0 end
    .t yview 1.0
    update
    .t yview scroll 3 units
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0}
---- Result should have been (exact matching):
{11.0 12.0 13.0} {4.0 10.0 11.0 12.0 13.0}
==== textDisp-4.13 FAILED



==== textDisp-4.14 UpdateDisplayInfo, special handling for top/bottom lines FAILED
==== Contents of test case:

    .t tag remove x 1.0 end
    .t yview 1.0
    update
    .t yview scroll 3 units
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0}
---- Result should have been (exact matching):
{11.0 12.0 13.0} {11.0 12.0 13.0}
==== textDisp-4.14 FAILED



==== textDisp-4.15 UpdateDisplayInfo, special handling for top/bottom lines FAILED
==== Contents of test case:

    .t tag add x 1.0 end
    .t yview 4.0
    update
    .t yview scroll -2 units
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0}
---- Result should have been (exact matching):
{2.0 3.0} {2.0 3.0 4.0 11.0}
==== textDisp-4.15 FAILED



==== textDisp-4.16 UpdateDisplayInfo, special handling for top/bottom lines FAILED
==== Contents of test case:

    .t tag remove x 1.0 end
    .t yview 4.0
    update
    .t yview scroll -2 units
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0}
---- Result should have been (exact matching):
{2.0 3.0} {2.0 3.0}
==== textDisp-4.16 FAILED


==== textDisp-6.1 scrolling in DisplayText, scroll up FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert 1.0 "Line 1"
    foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
        .t insert end "\nLine $i"
    }
    update
    .t delete 2.0 3.0
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0}
---- Result should have been (exact matching):
{2.0 10.0} {2.0 10.0}
==== textDisp-6.1 FAILED



==== textDisp-6.2 scrolling in DisplayText, scroll down FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert 1.0 "Line 1"
    foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
        .t insert end "\nLine $i"
    }
    update
    .t insert 2.0 "New Line 2\n"
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0}
---- Result should have been (exact matching):
{2.0 3.0} {2.0 3.0}
==== textDisp-6.2 FAILED



==== textDisp-6.3 scrolling in DisplayText, multiple scrolls FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1"
    foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
        .t insert end "\nLine $i"
    }
    update
    .t insert 2.end "is so long that it wraps"
    .t insert 4.end "is so long that it wraps"
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 2.20 3.0 4.0 4.20 5.0 6.0 7.0 8.0}
---- Result should have been (exact matching):
{2.0 2.20 4.0 4.20} {2.0 2.20 4.0 4.20}
==== textDisp-6.3 FAILED



==== textDisp-6.4 scrolling in DisplayText, scrolls interfere FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1"
    foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
        .t insert end "\nLine $i"
    }
    update
    .t insert 2.end "is so long that it wraps around, not once but three times"
    .t insert 4.end "is so long that it wraps"
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 2.20 2.40 2.60 3.0 4.0 4.20 5.0 6.0}
---- Result should have been (exact matching):
{2.0 2.20 2.40 2.60 4.0 4.20} {2.0 2.20 2.40 2.60 4.0 4.20 6.0}
==== textDisp-6.4 FAILED


==== textDisp-8.7 TkTextChanged FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert 1.0 "Line 1 is so long that it wraps around, two times"
    foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
        .t insert end "\nLine $i"
    }
    update
    .t delete 1.2 1.end
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0}
---- Result should have been (exact matching):
{1.0 9.0 10.0} {1.0 9.0 10.0}
==== textDisp-8.7 FAILED


==== textDisp-8.9 TkTextChanged FAILED
==== Contents of test case:

    .t delete 1.0 end
    .t insert 1.0 "Line 1 is so long that it wraps around, two times"
    foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
        .t insert end "\nLine $i"
    }
    update
    .t delete 2.0 3.0
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 1.20 1.40 2.0 3.0 4.0 5.0 6.0 7.0 8.0}
---- Result should have been (exact matching):
{2.0 8.0} {2.0 8.0}
==== textDisp-8.9 FAILED



==== textDisp-8.10 TkTextChanged FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
    .t tag add big 2.19
    update
    .t delete 2.19
    update
    set tk_textRedraw

---- Result was:
borders 1.0 2.0 2.20 3.0 3.20 4.0 eof
---- Result should have been (exact matching):
2.0 2.20 eof
==== textDisp-8.10 FAILED


==== textDisp-9.1 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
    update
    .t tag add big 2.2 2.4
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 2.18 3.0 4.0 eof}
---- Result should have been (exact matching):
{2.0 2.18} {2.0 2.18}
==== textDisp-9.1 FAILED


==== textDisp-9.3 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
    update
    .t tag add big 2.2 2.4
    update
    .t tag remove big 1.0 end
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 2.20 3.0 4.0 eof}
---- Result should have been (exact matching):
{2.0 2.20} {2.0 2.20 eof}
==== textDisp-9.3 FAILED



==== textDisp-9.4 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
    update
    .t tag add big 2.2 2.20
    update
    .t tag remove big 1.0 end
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 2.20 3.0 4.0 eof}
---- Result should have been (exact matching):
{2.0 2.20} {2.0 2.20 eof}
==== textDisp-9.4 FAILED



==== textDisp-9.5 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
    update
    .t tag add big 2.2 2.end
    update
    .t tag remove big 1.0 end
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 2.20 3.0 4.0 eof}
---- Result should have been (exact matching):
{2.0 2.20} {2.0 2.20 eof}
==== textDisp-9.5 FAILED


==== textDisp-9.7 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
    .t tag add big 2.19
    update
    .t tag remove big 2.19
    update
    set tk_textRedraw

---- Result was:
borders 1.0 2.0 2.20 3.0 3.20 4.0 eof
---- Result should have been (exact matching):
2.0 2.20 eof
==== textDisp-9.7 FAILED


==== textDisp-9.12 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap char
    .t delete 1.0 end
    for {set i 1} {$i < 5} {incr i} {
      .t insert end "Line $i+++Line $i\n"
    }
    .t tag configure hidden -elide true
    .t tag add hidden 2.6 3.6
    update
    .t tag add hidden 3.11 4.6
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 5.0 eof}
---- Result should have been (exact matching):
2.0 {2.0 eof}
==== textDisp-9.12 FAILED



==== textDisp-9.13 TkTextRedrawTag FAILED
==== Contents of test case:

    .t configure -wrap none
    .t delete 1.0 end
    for {set i 1} {$i < 10} {incr i} {
        .t insert end "Line $i - This is Line [format %c [expr 64+$i]]\n"
    }
    .t tag add hidden 2.8 2.17
    .t tag add hidden 6.8 7.17
    .t tag configure hidden -background red
    .t tag configure hidden -elide true
    update
    .t tag configure hidden -elide false
    update
    list $tk_textRelayout $tk_textRedraw

---- Result was:
{} {borders 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0}
---- Result should have been (exact matching):
{2.0 6.0 7.0} {2.0 6.0 7.0}
==== textDisp-9.13 FAILED


==== textDisp-11.2 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update
    .t yview 32.0
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
32.0 {borders 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0}
---- Result should have been (exact matching):
32.0 {40.0 41.0}
==== textDisp-11.2 FAILED



==== textDisp-11.3 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update
    .t yview 28.0
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
28.0 {borders 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0}
---- Result should have been (exact matching):
28.0 {28.0 29.0}
==== textDisp-11.3 FAILED



==== textDisp-11.4 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update
    .t yview 31.4
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
31.0 {borders 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0}
---- Result should have been (exact matching):
31.0 40.0
==== textDisp-11.4 FAILED


==== textDisp-11.6 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update
    set tk_textRedraw {}
    .t yview -pickplace 28.0
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
28.0 {borders 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0}
---- Result should have been (exact matching):
28.0 {28.0 29.0}
==== textDisp-11.6 FAILED



==== textDisp-11.7 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update ; update
    set tk_textRedraw {}
    .t yview -pickplace 26.0
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
21.0 {borders 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0}
---- Result should have been (exact matching):
21.0 {21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0}
==== textDisp-11.7 FAILED



==== textDisp-11.8 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update
    set tk_textRedraw {}
    .t yview -pickplace 41.0
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
32.0 {borders 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0}
---- Result should have been (exact matching):
32.0 {40.0 41.0}
==== textDisp-11.8 FAILED



==== textDisp-11.9 TkTextSetYView FAILED
==== Contents of test case:

    .t yview 30.0
    update
    set tk_textRedraw {}
    .t yview -pickplace 43.0
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
38.0 {borders 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0}
---- Result should have been (exact matching):
38.0 {40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0}
==== textDisp-11.9 FAILED


==== textDisp-11.12 TkTextSetYView, wrapped line is off-screen FAILED
==== Contents of test case:

    .t insert 10.0 "Long line with enough text to wrap\n"
    .t yview 1.0
    update
    set tk_textRedraw {}
    .t see 10.30
    update
    list [.t index @0,0] $tk_textRedraw

---- Result was:
2.0 {borders 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 10.20}
---- Result should have been (exact matching):
2.0 10.20
==== textDisp-11.12 FAILED



==== textDisp-11.13 TkTestSetYView, partially visible last line FAILED
==== Contents of test case:

    catch {destroy .top}
    toplevel .top
    wm geometry .top +0+0
    text .top.t -width 20 -height 5
    pack .top.t
    .top.t insert end "Line 1"
    for {set i 2} {$i <= 100} {incr i} {
        .top.t insert end "\nLine $i"
    }
    update
    scan [wm geometry .top] "%dx%d" w2 h2
    wm geometry .top ${w2}x[expr $h2-2]
    update
    .top.t yview 1.0
    update
    set tk_textRedraw {}
    .top.t see 5.0
    update
    # Note, with smooth scrolling, the results of this test
    # have changed, and the old '2.0 {5.0 6.0}' is quite wrong.
    list [.top.t index @0,0] $tk_textRedraw

---- Result was:
1.0 {borders 1.0 2.0 3.0 4.0 5.0}
---- Result should have been (exact matching):
1.0 5.0
==== textDisp-11.13 FAILED