diff options
author | fvogel <fvogelnew1@free.fr> | 2017-11-19 20:51:17 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-11-19 20:51:17 (GMT) |
commit | 9a4eabf02474d2d013be9be01b9cd78227bace3e (patch) | |
tree | 241bd0447728e6708315bb634188915886321d89 /tests | |
parent | 3bf68add2afec0323e278d4747d618a48fb1a855 (diff) | |
parent | 1be013d5076a48c72c60f3c611335cc787004b4e (diff) | |
download | tk-9a4eabf02474d2d013be9be01b9cd78227bace3e.zip tk-9a4eabf02474d2d013be9be01b9cd78227bace3e.tar.gz tk-9a4eabf02474d2d013be9be01b9cd78227bace3e.tar.bz2 |
Fix [73ba07efcd]: Use correct property type when handling MULTIPLE conversion requests. Patch from 'dpb'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/select.test | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/select.test b/tests/select.test index f9f3e38..de330e5 100644 --- a/tests/select.test +++ b/tests/select.test @@ -17,6 +17,13 @@ namespace import ::tk::test:loadTkCommand eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint cliboardManagerPresent 0 +if {![catch {selection get -selection CLIPBOARD_MANAGER -type TARGETS}]} { + if {"SAVE_TARGETS" in [selection get -selection CLIPBOARD_MANAGER -type TARGETS]} { + testConstraint cliboardManagerPresent 1 + } +} + global longValue selValue selInfo set selValue {} @@ -1044,6 +1051,8 @@ test select-10.6 {ConvertSelection procedure, reentrancy issues} -constraints { lappend result [dobg {selection get}] cleanupbg lappend result $selInfo +} -cleanup { + rename weirdHandler {} } -result {{PRIMARY selection doesn't exist or form "STRING" not defined} {STRING 0 4000}} ############################################################################## @@ -1148,8 +1157,20 @@ test select-13.1 {SelectionSize procedure, handler deleted} -constraints { cleanupbg lappend result $selInfo } -result {{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 STRING 0 4000 .f1 STRING 4000 4000}} + +test select-14.1 {Bug [73ba07efcd]: Use correct property type when handling MULTIPLE conversion requests} -constraints { + cliboardManagerPresent +} -setup { + proc get_clip {offset maxChars} {return abcd} +} -body { + selection handle -selection CLIPBOARD . get_clip + selection own -selection CLIPBOARD . + selection get -selection CLIPBOARD_MANAGER -type SAVE_TARGETS + clipboard get +} -cleanup { + rename get_clip {} +} -result {abcd} -catch {rename weirdHandler {}} # cleanup cleanupTests |