summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorculler <culler>2021-04-27 20:04:35 (GMT)
committerculler <culler>2021-04-27 20:04:35 (GMT)
commit3387e9ef1780a37d84b726bbde72b62624730325 (patch)
tree87592543d8e9bc83b18a5dff852cb708f55ccaf5 /tests
parent5548b9384faa00a2bb51f6b6f1cb9533eeaf246c (diff)
downloadtk-3387e9ef1780a37d84b726bbde72b62624730325.zip
tk-3387e9ef1780a37d84b726bbde72b62624730325.tar.gz
tk-3387e9ef1780a37d84b726bbde72b62624730325.tar.bz2
Adjust textWind-17.10
Diffstat (limited to 'tests')
-rw-r--r--tests/textWind.test28
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/textWind.test b/tests/textWind.test
index 11f8eb8..1329790 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -1526,15 +1526,13 @@ test textWind-17.9 {peer widget window configuration} -setup {
destroy .t .tt
} -body {
pack [text .t]
- update idletasks
.t delete 1.0 end
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
- update idletasks
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
+ update ; update
.tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -bg red]
- update idletasks
list [.t window configure 1.2 -window] [.tt.t window configure 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1543,28 +1541,34 @@ test textWind-17.9 {peer widget window configuration} -setup {
test textWind-17.10 {peer widget window configuration} -setup {
destroy .t .tt
} -body {
+ set res {}
pack [text .t]
- update idletasks
.t delete 1.0 end
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
update idletasks
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
+ update idletasks
+ # There should be a window in the main widget but not in the peer.
+ lappend res [.t window configure 1.2 -window]
+ lappend res [.tt.t window configure 1.2 -window]
.tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg blue]
update idletasks
- .t window configure 1.2 -create \
- {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red}
- .tt.t window configure 1.2 -window {}
+ .t window configure 1.2 -create {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red}
+ update idletasks
+ # The main widget should not have changed.
+ lappend res [.t window configure 1.2 -window]
.t window configure 1.2 -window {}
- set res [list [.t window configure 1.2 -window] \
- [.tt.t window configure 1.2 -window]]
+ .tt.t window configure 1.2 -window {}
update idletasks
- lappend res [.t window configure 1.2 -window] \
- [.tt.t window configure 1.2 -window]
+ # Nothing should have changed.
+ lappend res [.t window configure 1.2 -window]
+ lappend res [.tt.t window configure 1.2 -window]
} -cleanup {
destroy .tt .t
-} -result {{-window {} {} {} {}} {-window {} {} {} {}} {-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}}
+} -result {{-window {} {} {} .t.f} {-window {} {} {} {}} {-window {} {} {} .t.f}\
+{-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}}
test textWind-18.1 {embedded window deletion triggered by a script bound to <Map>} -setup {
catch {destroy .t .f .f2}