Tk Source Code

Check-in [2271428c]
Login

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

Overview
Comment:Tests for same issues with [listbox ... -listvariable].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bug-5d991b822e
Files: files | file ages | folders
SHA3-256: 2271428cd602292edf0e46dfebff87525beac25914cee155703c7542829c5cec
User & Date: dgp 2019-05-15 17:01:05.914
Context
2019-05-15
17:08
Fix for the failing/crashing listbox tests. check-in: b3533d47 user: dgp tags: bug-5d991b822e
17:01
Tests for same issues with [listbox ... -listvariable]. check-in: 2271428c user: dgp tags: bug-5d991b822e
2019-05-12
23:56
Similar tests and fix for [entry .... -textvariable] check-in: 88e2b06f user: dgp tags: bug-5d991b822e
Changes
Unified Diff Ignore Whitespace Patch
Changes to tests/listbox.test.
3172
3173
3174
3175
3176
3177
3178



























3179
3180
3181
3182
3183
3184
3185
    event generate .l <1> -x 5 -y 5  ; # <<ListboxSelect>> fires
    selection clear                  ; # <<ListboxSelect>> fires again
    update
    set res
} -cleanup {
    destroy .l
} -result {{.l 0} {{} {}}}




























resetGridInfo
deleteWindows
option clear

# cleanup
cleanupTests







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
    event generate .l <1> -x 5 -y 5  ; # <<ListboxSelect>> fires
    selection clear                  ; # <<ListboxSelect>> fires again
    update
    set res
} -cleanup {
    destroy .l
} -result {{.l 0} {{} {}}}

test listbox-32.1 {Bug [5d991b822e]} {
    # Want this not to segfault, or write to variable with empty name
    set var INIT
    listbox .b -listvariable var
    trace add variable var unset {apply {args {
        .b configure -listvariable {}
    }}}
    pack .b
    bind .b <Configure> {unset var}
    update
    destroy .b
    info exists {}
} 0
test listbox-32.2 {Bug [5d991b822e]} {
    # Want this not to leak traces
    set var INIT
    listbox .b -listvariable var
    trace add variable var unset {apply {args {
        .b configure -listvariable new
    }}}
    pack .b
    bind .b <Configure> {unset -nocomplain var}
    update
    destroy .b
    unset new
} {}

resetGridInfo
deleteWindows
option clear

# cleanup
cleanupTests