diff options
author | culler <culler> | 2020-08-07 13:12:21 (GMT) |
---|---|---|
committer | culler <culler> | 2020-08-07 13:12:21 (GMT) |
commit | f460900f9f25ca6b02f7e5de803eb63a84a2d12a (patch) | |
tree | f5c14657e4856ef89adf74b9781b5eab5c7b9f16 | |
parent | 9557127009db74d0f4196e17d6cf1f536ef73547 (diff) | |
download | tcl-f460900f9f25ca6b02f7e5de803eb63a84a2d12a.zip tcl-f460900f9f25ca6b02f7e5de803eb63a84a2d12a.tar.gz tcl-f460900f9f25ca6b02f7e5de803eb63a84a2d12a.tar.bz2 |
Experiment with io-50.1 on Travis
-rw-r--r-- | tests/chanio.test | 11 | ||||
-rw-r--r-- | tests/io.test | 9 |
2 files changed, 9 insertions, 11 deletions
diff --git a/tests/chanio.test b/tests/chanio.test index 5266d57..7ffe492 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -6526,16 +6526,13 @@ test chan-io-50.6 {testing handler deletion vs reentrant calls} -setup { } set z "" set u toplevel - # Testing why this test fails on Travis: - # The test appears to assume that select will not detect the - # new file until update is called. - lappend z "1" + # This test assume that select will not detect the new open file + # until the update command runs. This is not guaranteed, but it + # seems to help if we make sure that the calls to testchannelevent + # immediately follow the call to open. set f [open $path(test1) r] - lappend z "2" testchannelevent $f add readable [namespace code [list second $f]] - lappend z "3" testchannelevent $f add readable [namespace code [list first $f]] - lappend z "update" update set z } -cleanup { diff --git a/tests/io.test b/tests/io.test index 912f4c5..c9019af 100644 --- a/tests/io.test +++ b/tests/io.test @@ -6725,17 +6725,18 @@ test io-49.5 {testing crlf reading, leftover cr disgorgment} { test io-50.1 {testing handler deletion} -constraints testchannelevent -setup { file delete $path(test1) } -body { - set f [open $path(test1) w] - close $f - set f [open $path(test1) r] - testchannelevent $f add readable [namespace code [list delhandler $f]] proc delhandler {f} { variable z set z called testchannelevent $f delete 0 } + set f [open $path(test1) w] + close $f set z not_called update + set f [open $path(test1) r] + testchannelevent $f add readable [namespace code [list delhandler $f]] + update set z } -cleanup { close $f |