Skip to content

Correct <...> name-template description in 6.0.0 release notes#2812

Merged
nohwnd merged 1 commit into
mainfrom
nohwnd-issue-2808-review
Jun 29, 2026
Merged

Correct <...> name-template description in 6.0.0 release notes#2812
nohwnd merged 1 commit into
mainfrom
nohwnd-issue-2808-review

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

The 6.0.0 release notes (docs/6.0.0.md) described <...> test/block-name expansion as data-only:

Test and block names expand data templates only. <...> tokens … now interpolate only the current data item and its properties — not arbitrary PowerShell expressions.

That is inaccurate. The change in #2740 made the text outside <...> inert (the actual #2044 fix), but the content inside <...> is still evaluated as a full PowerShell expression at run time and rendered through the formatter — a superset of v5.

Verified against a build of main (PowerShell 7.5.5):

Name source Renders as
adds up to <($a + $b)> adds up to 3
<($a.ToString("000"))> 007
<a> `$($global:x = $true)` literal — does not execute

This rewrites the breaking-change bullet to describe what actually changed: only <...> tokens are expanded (everything else kept literal, closing the parse-break / injection vector from #2044), <...> still evaluates expressions rendered via the formatter, this is broader than v5, and you escape a literal bracket with `<.

The companion docs fix (the stale "Internals" mechanism description) is pester/docs#380.

Fix #2808

The breaking-change note claimed <...> tokens expand data templates only and
not arbitrary PowerShell expressions. That is inaccurate: only the text outside
<...> is kept literal (the actual #2044 fix), while the content inside <...> is
still evaluated as a full PowerShell expression at run time and rendered through
the formatter. Rewrite the bullet to describe what actually changed, including
that this is broader than v5 and how to escape a literal <.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd added this to the 6.0.0 milestone Jun 29, 2026
@nohwnd nohwnd changed the title Correct &lt;...&gt; name-template description in 6.0.0 release notes Correct <...> name-template description in 6.0.0 release notes Jun 29, 2026
@nohwnd nohwnd enabled auto-merge (squash) June 29, 2026 21:03
@nohwnd nohwnd disabled auto-merge June 29, 2026 21:03
@nohwnd nohwnd merged commit 7e7db38 into main Jun 29, 2026
3 checks passed
@nohwnd nohwnd deleted the nohwnd-issue-2808-review branch June 29, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify <...> test-name expansion in 6.0.0: release notes say "data only" but rc2 evaluates expressions

1 participant