Tcl Source Code

Check-in [c1db7d219b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256: c1db7d219b47c55925a665377a4fabd69a1a85644c7b5c71a0450f52fc5397a1
User & Date: dgp 2019-04-17 16:26:03.836
Context
2019-04-17
16:32
Duplicate test names. check-in: 024761f29a user: dgp tags: core-8-branch
16:26
The [namespace delete ::httpTest] at the end of httpPipeline.test failed to also undo the custom [::... check-in: c1db7d219b user: dgp tags: core-8-branch
15:08
[60559fd4a6] Test more robust against frame contexts of testing environment. check-in: 1b2cf8fff3 user: dgp tags: core-8-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to tests/httpTest.tcl.
64
65
66
67
68
69
70
71




72
73
74
75
76
77
78
        ::httpTest::LogRecord $txt
        ::httpTest::Puts $txt
    } elseif {$::httpTest::testOptions(-verbose) > 1} {
        ::httpTest::Puts $txt
    }
    return
}






# Called by http::Log (the "testing" version) to record logs for later analysis.

proc httpTest::LogRecord {txt} {
    variable testResults

    set pos [string first ^ $txt]







|
>
>
>
>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
        ::httpTest::LogRecord $txt
        ::httpTest::Puts $txt
    } elseif {$::httpTest::testOptions(-verbose) > 1} {
        ::httpTest::Puts $txt
    }
    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.

proc httpTest::LogRecord {txt} {
    variable testResults

    set pos [string first ^ $txt]