From 3a234ba343433d741a7a0c873702da6cb7987ae5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 19 Feb 2016 14:42:53 +0000 Subject: Add test-case which demonstrates the problem. This test-case fails in trunk (but passes in core-8-5-branch, as expected). --- tests/env.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/env.test b/tests/env.test index 83d99e0..f9df4d6 100644 --- a/tests/env.test +++ b/tests/env.test @@ -314,6 +314,19 @@ test env-7.2 {[219226]: links to env elements should not be removed by read} { }} } ok +test env-7.3 {[9b4702]: testing existence of env(some_thing) should not destroy trace} { + apply {{} { + 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) + }} +} 1 + # Restore the environment variables at the end of the test. foreach name [array names env] { -- cgit v0.12