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
e44f1d0e87Many tcltest improvements, [773924ffff], [811659ffff], [572400ffff], [8413e79232] and [1528500fff] check-in2026-10-22 11:44:24891b7e7921Many tcltest improvements, [773924ffff], [9f4feaaaa1], [811659ffff], [572400ffff], [8413e79232] and [1528500fff] check-in2026-10-22 08:25:31d2a4bee0f0Ticket [9f4feaaaa1] tcltest test contraints with a dash (-) in the name doesn't work status still Open with 4 other changes ticket2026-10-20 14:02:40e055230591Fix [773924ffff]: -match and -skip select top-level tests only; tests nested in a selected test always run. check-in2026-10-20 13:58:09
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.