diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/env.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/env.test b/tests/env.test index ee13b7f..a7aa162 100644 --- a/tests/env.test +++ b/tests/env.test @@ -252,6 +252,20 @@ test env-6.1 {corner cases - add lots of env variables} {} { expr {[array size env] - $size} } 100 +test env-7.3 {[9b4702]: testing existence of env(some_thing) should not destroy trace} -body { + catch {unset ::env(test7_3)} + proc foo args { + set ::env(test7_3) ok + } + trace add variable ::env(not_yet_existent) write foo + info exists ::env(not_yet_existent) + set ::env(not_yet_existent) "Now I'm here"; + info exists ::env(test7_3) +} -cleanup { + unset ::env(not_yet_existent) + unset ::env(test7_3) +} -result 1 + # Restore the environment variables at the end of the test. foreach name [array names env] { |