diff --git a/CHANGELOG.md b/CHANGELOG.md index 9db15631..980231a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ The latest `## [X.Y.Z]` header must match the `version` field in `punkproject.to Entries are newest-first; one bullet per notable change. See the root `AGENTS.md` "Project Versioning" section for the bump policy. +## [0.49.7] - 2026-08-04 + +- punk::tcltestrun 0.4.1 (G-161 follow-on, landed at user direction): + errorInfo/errorCode values in failure reports no longer carry the + historic leading space (the 16-character "---- errorInfo: " / + "---- errorCode: " prefixes were captured from index 15 - the prefix's + trailing space - instead of 16). Report-shape normalization only; the + parser suite now pins the normalized shape exactly. + ## [0.49.6] - 2026-08-04 - punk::tcltestrun 0.4.0 (G-161): `parse_testrun` now parses failing-test diff --git a/goals/archive/G-161-tcltestrun-multiline-banner.md b/goals/archive/G-161-tcltestrun-multiline-banner.md index 6fdbb90b..25f6a5d6 100644 --- a/goals/archive/G-161-tcltestrun-multiline-banner.md +++ b/goals/archive/G-161-tcltestrun-multiline-banner.md @@ -107,4 +107,4 @@ lines inside test output) must keep their current behaviour for single-line case Follow-on: anchor-verify single-line opening banners too - any "==== * FAILED" line still opens failure capture unanchored (the historic emulated-banner confounder cost, pinned by parsetestrun-confounder-5.0); anchoring would close it but changes characterized behaviour => open Follow-on: closing-banner prefix match uses glob string match on the raw name, so a test NAME containing glob metacharacters can mis-match its opening text (latent, pre-existing, unexercised in the corpus) => open -Follow-on: errorInfo/errorCode capture retains a historic leading space (capture ranges from index 15 of the 16-char "---- errorCode: " prefix); consumers tolerate it and the parser suite trims - normalizing is a report-shape change => open +Follow-on: errorInfo/errorCode capture retains a historic leading space (capture ranges from index 15 of the 16-char "---- errorCode: " prefix); consumers tolerate it and the parser suite trims - normalizing is a report-shape change => landed 2026-08-04 (tcltestrun 0.4.1 parse_testrun index-16 capture, parsetestrun-multiline-error-3.0 pins the normalized shape exact; punkshell 0.49.7) diff --git a/punkproject.toml b/punkproject.toml index 9c2fbcba..679818c3 100644 --- a/punkproject.toml +++ b/punkproject.toml @@ -1,6 +1,6 @@ [project] name = "punkshell" -version = "0.49.6" +version = "0.49.7" license = "BSD-2-Clause" url = "https://www.gitea1.intx.com.au/jn/punkshell" #packager: declared identity for published artifacts (declarative, not proof - diff --git a/src/modules/punk/tcltestrun-999999.0a1.0.tm b/src/modules/punk/tcltestrun-999999.0a1.0.tm index c254445f..7b657e32 100644 --- a/src/modules/punk/tcltestrun-999999.0a1.0.tm +++ b/src/modules/punk/tcltestrun-999999.0a1.0.tm @@ -292,10 +292,14 @@ tcl::namespace::eval punk::tcltestrun { if {$fail_stage eq "error" && ![string match "==== * FAILED" $ln_trimright]} { if {[string match "---- errorInfo: *" $ln]} { dict append results out "<$pkg> $ln" \n - dict append test_case_fail errorinfo "[string range $ln 15 end]\n" + #"---- errorInfo: " is 16 chars (indices 0-15) - capture from index 16 + #so the value carries no leading space (0.4.1; historically ranged from + #15 and every captured value led with the prefix's trailing space) + dict append test_case_fail errorinfo "[string range $ln 16 end]\n" continue } elseif {[string match "---- errorCode: *" $ln]} { - dict set test_case_fail errorcode "[string range $ln 15 end]" + #same 16-char prefix and index-16 capture as errorInfo above (0.4.1) + dict set test_case_fail errorcode "[string range $ln 16 end]" dict append results out "<$pkg> $ln" \n continue } elseif {[string match "---- *" $ln]} { diff --git a/src/modules/punk/tcltestrun-buildversion.txt b/src/modules/punk/tcltestrun-buildversion.txt index 9fba7333..27079358 100644 --- a/src/modules/punk/tcltestrun-buildversion.txt +++ b/src/modules/punk/tcltestrun-buildversion.txt @@ -1,6 +1,7 @@ -0.4.0 +0.4.1 #First line must be a semantic version number #all other lines are ignored. +#0.4.1 - parse_testrun fix (G-161 follow-on, landed at user direction): errorInfo/errorCode values no longer carry the historic leading space - the "---- errorInfo: "/"---- errorCode: " prefixes are 16 characters and the capture ranged from index 15 (the prefix's trailing space); capture now starts at index 16. Report-shape normalization only; continuation errorInfo lines were always raw and are unchanged. #0.4.0 - parse_testrun (G-161): multi-line opening-banner tolerance. A failing test whose description contains embedded newlines (tcltest emits the banner as ONE puts spanning physical lines) is now parsed with full fidelity - failure entry with name/description/result_was/result_expected - and every later event including the summary line keeps flowing. Recognition anchors on '---- start' events (-verbose start, which runtests.tcl always passes) plus bounded banner-continuation buffering, abandoned at the next recognisable event line so banner-ish ordinary output cannot swallow events. Streams without start events, and all single-line parse paths (including the emulated-banner confounder heuristics), behave exactly as before. #0.4.0 - parse_testrun fix (G-161): result_expected was NEVER captured - the '---- Result should have been' opener always arrives while the result_was capture is active, and the active-capture reset branch fell through PAST the opener elseif, so every FAILED record lacked result_expected and the expected-value lines leaked into test_body. The active-capture branch now transitions result_was -> result_expected directly. #0.3.1 - fix: tm_path_additional_ifneeded exclude list missed the G-155 _build->_mint staging rename - staged pods in _mint were registered as bogus _mint::* modules; now -exclude-paths {**/_build/*** **/_mint/***} (full option name, ***-tail pruning form; _build kept for legacy checkouts) diff --git a/src/tests/runner/testsuites/parser/parsetestrun.test b/src/tests/runner/testsuites/parser/parsetestrun.test index dc9a1ed6..e305f8b1 100644 --- a/src/tests/runner/testsuites/parser/parsetestrun.test +++ b/src/tests/runner/testsuites/parser/parsetestrun.test @@ -154,11 +154,12 @@ namespace eval ::testspace { set f [dict get $r testcase_fails t-err-3.0] lappend facts status [dict get $f test_status] lappend facts desc_ok [string equal [dict get $f test_description] "erroring test whose description\nspans two lines"] - #errorcode/errorinfo carry a historic leading space ("---- errorCode: " is - #16 chars, the capture ranges from index 15) - tolerated, not pinned + #errorcode/errorinfo are captured without the historic leading space since + #tcltestrun 0.4.1 (the 16-char "---- errorCode: " prefix; capture starts at + #index 16) - pinned exact/anchored here lappend facts returncode [dict get $f returncode] - lappend facts errorcode [string trim [dict get $f errorcode]] - lappend facts errorinfo_ok [string match "*boom*while executing*" [dict get $f errorinfo]] + lappend facts errorcode [dict get $f errorcode] + lappend facts errorinfo_ok [string match "boom*while executing*" [dict get $f errorinfo]] set facts } -result {detected 1 totals 1/0/0/1 fails 1 passes 0 skips 0 status ERROR desc_ok 1 returncode 1 errorcode NONE errorinfo_ok 1}