summaryrefslogtreecommitdiffstats
path: root/tests/text.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-04-29 09:42:11 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-04-29 09:42:11 (GMT)
commitdbda3d1f347c441a31859af78be708bf252c105d (patch)
tree515c619ded68ef15475279036fd94feeb8321b26 /tests/text.test
parent19c2c50026b8bab5bb046490d48d6aad650183eb (diff)
parentdb7e7551cf53c81935e1fbbaa710f4b46bed47d5 (diff)
downloadtk-dbda3d1f347c441a31859af78be708bf252c105d.zip
tk-dbda3d1f347c441a31859af78be708bf252c105d.tar.gz
tk-dbda3d1f347c441a31859af78be708bf252c105d.tar.bz2
Fixed [fd3a4dc111] - <<Modified>> event is not always sent to peers
Diffstat (limited to 'tests/text.test')
-rw-r--r--tests/text.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/text.test b/tests/text.test
index a778b79..641635e 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6321,6 +6321,21 @@ test text-27.14 {<<Modified>> virtual event - delete before Modified} -body {
} -cleanup {
destroy .t
} -result {thing special}
+test text-27.14a {<<Modified>> virtual event - propagation to peers} -body {
+# Bug [fd3a4dc111], <<Modified>> event is not always sent to peers
+ set ::retval 0
+ text .t -undo 1
+ .t peer create .tt
+ pack .t .tt
+ bind .t <<Modified>> {incr ::retval}
+ bind .tt <<Modified>> {incr ::retval}
+ .t insert end "This increments ::retval once for each peer, i.e. twice."
+ .t edit modified 0 ; # shall increment twice as well, not just once
+ update idletasks
+ set ::retval
+} -cleanup {
+ destroy .t .tt
+} -result {4}
test text-27.15 {<<Selection>> virtual event} -body {
set ::retval no_selection
pack [text .t -undo 1]