summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-11-19 20:50:14 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-11-19 20:50:14 (GMT)
commit1be013d5076a48c72c60f3c611335cc787004b4e (patch)
tree5b0f3bb057bc8e73e76c030dcfeb3d63783754f5 /tests
parent453c86e0e9f9fce7d9d0149e09f2b1bb2040a846 (diff)
parentb8aaeefe598d7cbcbfb19d8ffc906f107d946428 (diff)
downloadtk-1be013d5076a48c72c60f3c611335cc787004b4e.zip
tk-1be013d5076a48c72c60f3c611335cc787004b4e.tar.gz
tk-1be013d5076a48c72c60f3c611335cc787004b4e.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.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/select.test b/tests/select.test
index 77bfb2e..a7cd780 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