diff options
author | dgp <dgp@users.sourceforge.net> | 2014-05-01 15:00:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-05-01 15:00:40 (GMT) |
commit | b40083e57b3756f499252aa8a3a0ac428ef7a258 (patch) | |
tree | 4e88d2c27367d6080859a80eec5fa75397e65a03 /tests/ioCmd.test | |
parent | c6acf803800f1068fd66be5a3fecae9788c8f0d3 (diff) | |
parent | 09c394df7d97291aecb28a07a6c5de3f0814a341 (diff) | |
download | tcl-b40083e57b3756f499252aa8a3a0ac428ef7a258.zip tcl-b40083e57b3756f499252aa8a3a0ac428ef7a258.tar.gz tcl-b40083e57b3756f499252aa8a3a0ac428ef7a258.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. |