summaryrefslogtreecommitdiffstats
path: root/tests/httpTest.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2019-04-17 16:26:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2019-04-17 16:26:03 (GMT)
commit12486f233fe3dee8ac48f4ec6c7c2bb1ea798c88 (patch)
treef77b04426387d50276facdf76fb5d3514c82a459 /tests/httpTest.tcl
parent1d896481cffd3dfe07fbd98c4e6a6aca6a6eabbd (diff)
downloadtcl-12486f233fe3dee8ac48f4ec6c7c2bb1ea798c88.zip
tcl-12486f233fe3dee8ac48f4ec6c7c2bb1ea798c88.tar.gz
tcl-12486f233fe3dee8ac48f4ec6c7c2bb1ea798c88.tar.bz2
The [namespace delete ::httpTest] at the end of httpPipeline.test failed to
also undo the custom [::http::Log] command it put in place. This dangling command was left broken and made much failure. Revised httpTest.tcl to use a trace to tidy up after itself.
Diffstat (limited to 'tests/httpTest.tcl')
-rw-r--r--tests/httpTest.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/httpTest.tcl b/tests/httpTest.tcl
index 326b361..4345845 100644
--- a/tests/httpTest.tcl
+++ b/tests/httpTest.tcl
@@ -68,7 +68,11 @@ proc http::Log {args} {
}
return
}
-
+# The http::Log routine above needs the variable ::httpTest::testOptions
+# Set up to destroy it when that variable goes away.
+trace add variable ::httpTest::testOptions unset {apply {args {
+ proc ::http::Log args {}
+}}}
# Called by http::Log (the "testing" version) to record logs for later analysis.