diff options
author | sebres <sebres@users.sourceforge.net> | 2024-03-13 14:13:57 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-03-13 14:13:57 (GMT) |
commit | 0f486d81b97b210d9370c7e85f96b7ef4e69cd22 (patch) | |
tree | 22105e604cbe27367a499e696696ca6e941c64de /tests | |
parent | d6f35919d65a51f0e194bee5f05138825ae1393b (diff) | |
download | tcl-0f486d81b97b210d9370c7e85f96b7ef4e69cd22.zip tcl-0f486d81b97b210d9370c7e85f96b7ef4e69cd22.tar.gz tcl-0f486d81b97b210d9370c7e85f96b7ef4e69cd22.tar.bz2 |
better test-mockup, don't disclose artificially skipped test for valid mode
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/clock.test b/tests/clock.test index d283e16..5a4b72f 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -37,11 +37,10 @@ testConstraint y2038 \ set valid_mode [clock configure -valid] # Wrapper to show validity mode in the test-case name (for possible errors): -rename test __test proc test {args} { variable valid_mode lset args 0 [lindex $args 0].vm:$valid_mode - uplevel [linsert $args [set args 0] __test] + tailcall ::tcltest::test {*}$args } puts [outputChannel] " Validity default mode: [expr {$valid_mode ? "on": "off"}]" @@ -38260,9 +38259,16 @@ test clock-67.5 {Change scan %x output on global locale change [Bug 4a0c163d24]} ::tcl::clock::ClearCaches rename test {} -rename __test test +namespace import -force ::tcltest::* +# adjust expected skipped (valid_off is an artificial constraint): +if {$valid_mode && [info exists ::tcltest::skippedBecause(valid_off)]} { + incr ::tcltest::numTests(Total) -$::tcltest::skippedBecause(valid_off) + incr ::tcltest::numTests(Skipped) -$::tcltest::skippedBecause(valid_off) + unset ::tcltest::skippedBecause(valid_off) +} ::tcltest::cleanupTests namespace delete ::testClock +unset valid_mode return |