Skip to content
Tcl Source Code View Ticket
Login

View Ticket

nested tests and -match

Closed / Fixed773924ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 36 days ago
Descriptionplain2003-07-18 20:57:18
nested tests cause confusing results
with -match.

For example running the test suite
with "-match tcltest-21.4" will fail
because the body of tcltest-21.4
includes the test tcltest-21.4.0,
which will be skipped because it
doesn't match the -match pattern,
leading to different results than expected.

Fix for tcltest.test is to jump through
even more hoops, and for other
test suites, nested tests should
just about always be avoided.
Referenced by4
serhiy.storchakawiki2026-10-20 13:58:50

Still the case on main, 9.0 and 8.6: 14 tests in tcltest.test fail when selected alone with -match (tcltest-21.4/5/6/10/11/12, 24.9/10/13/15/17/18/20, 25.3), because their nested tests do not match.

Proposed fix in branch [tcltest-nested-match]: -match and -skip are applied only to top-level tests, so tests nested in a selected test always run. Documented in tcltest.n, new test tcltest-28.1. All 131 tcltest.test tests now pass when run alone.

jan.nijtmanswiki2026-10-22 08:38:28

Fixed in [trunk], not yet backported to 9.0 and 8.6

jan.nijtmanswiki2026-10-28 13:41:47

Now also backported to core-9-0-branch and core-8-6-branch

Closing. Many thanks!

Log in (anonymous is fine) to add a comment.