You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit de4018a
Browse filesBrowse the repository at this point in the historyBrowse files
test(help): pin the directive character class and the last-run-above rule
A scoped review of the help-detector fix found two behaviours the fixture set
asserts but does not discriminate: mutating either survives every assertion in
the file, so a regression in either would land green.
The character class. The existing 'dotword-prose-voids-block' fixture is
documented as pinning `\w` against `[A-Za-z]`, and does not -- `.NET` is pure
ASCII, so both patterns match it identically and what that fixture actually
pins is the argument group. Add 'digit-dotword-voids-block', whose `.EXAMPLE`
body opens with `.5 is a fraction ...`: directive-shaped to `\w` alone.
Measured on pwsh 7.6.5 and WinPS 5.1, Get-Help renders auto-generated syntax
help and no parameter text for it, so narrowing the class would credit a cmdlet
whose help does not render at all. Correct the attribution in the two comments
that made the wrong claim.
Which run above the function counts. Every above-function fixture holds exactly
one run up there, so reading the first instead of the last is indistinguishable
in all of them -- and in 'distant-header' the first falls through anyway, on
adjacency. Add 'last-run-above-function-wins': a file header first, real help
last, and a body block as well. Measured on both editions, Get-Help renders the
last run, so reading the first would fall through and credit a body block no
reader ever sees.
Both fixtures were mutation-checked: narrowing the class to `[A-Za-z]` at both
sites, and taking `$aboveRuns[0]`, each now fail the suite and passed before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Should -BeFalse -Because 'measured on both editions: `.5 is a fraction ...` is directive-shaped to `\w` and Get-Help renders no help for this cmdlet, so narrowing the class to `[A-Za-z]` would credit a block that does not render'
1648
+
$records['digit-dotword-voids-block'].MissingParameters | Should -Be @('Name')
Should -BeFalse -Because 'the help that renders sits above the function, so the body block is not what a reader sees and must not be scored as though it were'
1677
+
$records['last-run-above-function-wins'].MissingParameters | Should -Be @('Name')
0 commit comments