diff options
author | dgp <dgp@users.sourceforge.net> | 2014-05-01 14:52:13 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-05-01 14:52:13 (GMT) |
commit | ab0e4b9897d95d1c3f643524a08c99425055ea5e (patch) | |
tree | 054b1a32984f0bd512dcdf3a4a778311fea392db /tests | |
parent | a777eef5bbacd8802c32ce467ee9bb989486f122 (diff) | |
parent | cf5a2fcdb5b8dd834e530641922f7ba5c841553f (diff) | |
download | tcl-ab0e4b9897d95d1c3f643524a08c99425055ea5e.zip tcl-ab0e4b9897d95d1c3f643524a08c99425055ea5e.tar.gz tcl-ab0e4b9897d95d1c3f643524a08c99425055ea5e.tar.bz2 |
merge 8.5
Diffstat (limited to 'tests')
-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 8bf32d2..bb133f9 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -806,6 +806,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. |