diff options
author | dgp <dgp@users.sourceforge.net> | 2014-05-01 15:13:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-05-01 15:13:46 (GMT) |
commit | 7526dfb7b5a0389d1442df96f1cfb2b7173649ed (patch) | |
tree | fb22b91d4f6acc638d2a4d80366274d61b9bb7c9 /tests/ioCmd.test | |
parent | a2fb498f19ef2cc63056bb932b942f0c1c407e93 (diff) | |
parent | 09c394df7d97291aecb28a07a6c5de3f0814a341 (diff) | |
download | tcl-7526dfb7b5a0389d1442df96f1cfb2b7173649ed.zip tcl-7526dfb7b5a0389d1442df96f1cfb2b7173649ed.tar.gz tcl-7526dfb7b5a0389d1442df96f1cfb2b7173649ed.tar.bz2 |
merge trunk
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r-- | tests/ioCmd.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 36339ec..3976d25 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -844,6 +844,39 @@ test iocmd-21.22 {[close] in [read] segfaults} -setup { catch {close $ch} rename foo {} } -match glob -result {*invalid argument*} +test iocmd-21.23 {[close] in [gets] segfaults} -setup { + proc foo {method chan args} { + switch -- $method initialize { + return {initialize finalize watch read} + } finalize {} watch {} read { + catch {close $chan} + return \n + } + } + set ch [chan create read foo] +} -body { + gets $ch +} -cleanup { + catch {close $ch} + rename foo {} +} -result {} +test iocmd-21.24 {[close] in binary [gets] segfaults} -setup { + proc foo {method chan args} { + switch -- $method initialize { + return {initialize finalize watch read} + } finalize {} watch {} read { + catch {close $chan} + return \n + } + } + set ch [chan create read foo] +} -body { + chan configure $ch -translation binary + gets $ch +} -cleanup { + catch {close $ch} + rename foo {} +} -result {} # --- --- --- --------- --------- --------- # Helper commands to record the arguments to handler methods. |