summaryrefslogtreecommitdiffstats
path: root/tests/env.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/env.test')
-rw-r--r--tests/env.test13
1 files changed, 13 insertions, 0 deletions
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] {