diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-06-20 19:40:30 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-06-20 19:40:30 (GMT) |
commit | 2f8cb2ab854a2e311b49c8276bb59a76adaeafeb (patch) | |
tree | 18199412af511ff26bc7908971c230bbc27c9c86 /tests/execute.test | |
parent | a9083528ab684358217abe17be6bce6765817f6a (diff) | |
download | tcl-2f8cb2ab854a2e311b49c8276bb59a76adaeafeb.zip tcl-2f8cb2ab854a2e311b49c8276bb59a76adaeafeb.tar.gz tcl-2f8cb2ab854a2e311b49c8276bb59a76adaeafeb.tar.bz2 |
[6bdadfba7d] Stop crash with multi-lappend and failing writes
Diffstat (limited to 'tests/execute.test')
-rw-r--r-- | tests/execute.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/execute.test b/tests/execute.test index e1ed68b..e9668a9 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -1066,6 +1066,45 @@ test execute-11.3 {Bug a0ece9d6d4} -setup { trace remove execution crash enterstep {apply {args {info frame -2}}} rename crash {} } -result 1 + +test execute-12.1 {failing multi-lappend to unshared} -setup { + unset -nocomplain x y +} -body { + set x 1 + lappend x 2 3 + trace add variable x write {apply {args {error boo}}} + lappend x 4 5 +} -cleanup { + unset -nocomplain x y +} -returnCodes error -result {can't set "x": boo} +test execute-12.2 {failing multi-lappend to shared} -setup { + unset -nocomplain x y +} -body { + set x 1 + lappend x 2 3 + set y $x + trace add variable x write {apply {args {error boo}}} + lappend x 4 5 +} -cleanup { + unset -nocomplain x y +} -returnCodes error -result {can't set "x": boo} +test execute-12.3 {failing multi-lappend to unshared: LVT} -body { + apply {{} { + set x 1 + lappend x 2 3 + trace add variable x write {apply {args {error boo}}} + lappend x 4 5 + }} +} -returnCodes error -result {can't set "x": boo} +test execute-12.4 {failing multi-lappend to shared: LVT} -body { + apply {{} { + set x 1 + lappend x 2 3 + set y $x + trace add variable x write {apply {args {error boo}}} + lappend x 4 5 + }} +} -returnCodes error -result {can't set "x": boo} # cleanup if {[info commands testobj] != {}} { |