diff options
author | fvogel <fvogelnew1@free.fr> | 2018-11-18 19:36:30 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-11-18 19:36:30 (GMT) |
commit | 31bf9a3245670aecdfc3dae4b73dff104eca0f93 (patch) | |
tree | fad3ed3d67cf863cdcd5f35c46801147cb240858 /tests | |
parent | 30538753cf88a34db82e5164504bd2c9c1729067 (diff) | |
download | tk-31bf9a3245670aecdfc3dae4b73dff104eca0f93.zip tk-31bf9a3245670aecdfc3dae4b73dff104eca0f93.tar.gz tk-31bf9a3245670aecdfc3dae4b73dff104eca0f93.tar.bz2 |
Fix [b2dd3b4fe8]: text-11a.41 sometimes hangs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/text.test | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/text.test b/tests/text.test index 95e666a..ee46f02 100644 --- a/tests/text.test +++ b/tests/text.test @@ -3088,14 +3088,19 @@ test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup { append content [string repeat "$i " 50] \n } bind .top.yt <<WidgetViewSync>> {lappend res Sync:%d} + # make initial sync state known + .top.yt sync + update + # the next line triggers <<WidgetViewSync>> with %d==0 i.e. we're out of sync .top.yt insert 1.0 $content - vwait res ; # event dealt with by the event loop, with %d==0 i.e. we're out of sync - # ensure the test is relevant + vwait res + # ensure the test is relevant: the line metrics are not up-to-date (pendingsync is 1) lappend res "Pending:[.top.yt pendingsync]" - # - <<WidgetViewSync>> fires when sync returns if there was pending syncs - # - there is no more any pending sync after running 'sync' + # wait for the end of line metrics update by calling the sync command + # <<WidgetViewSync>> fires when sync returns with %d==1 i.e. we're in sync again + # at this time line metrics are up-to-date (pendingsync is 0) .top.yt sync - vwait res ; # event dealt with by the event loop, with %d==1 i.e. we're in sync again + vwait res lappend res "Pending:[.top.yt pendingsync]" set res } -cleanup { |