Skip to content

Fix chunk boundary scrubber bugs and test adapter defects#1779

Merged
SimonCropp merged 3 commits into
mainfrom
Fix-chunk-boundary-scrubber-bugs-and-test-adapter-defects
Jul 8, 2026
Merged

Fix chunk boundary scrubber bugs and test adapter defects#1779
SimonCropp merged 3 commits into
mainfrom
Fix-chunk-boundary-scrubber-bugs-and-test-adapter-defects

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

No description provided.

SimonCropp and others added 3 commits July 7, 2026 21:54
Scrubbers (Verify core):
- UserMachineScrubber: fix IndexOutOfRangeException when a match ends exactly
  on a chunk boundary with a following chunk (read the trailing char via the
  builder indexer instead of chunkSpan[neededFromCurrent])
- UserMachineScrubber, GuidScrubber, DirectoryReplacements: roll the carryover
  forward across chunks so a token spanning three or more chunks (with a middle
  chunk shorter than the token) is no longer silently left unscrubbed
- DateFormatLengthCalculator: 'K' contributes 0 to the minimum length (it can
  render as "", "Z" or "+11:00"), so round-trip/"o" formats now scrub the Z and
  offset-less forms instead of only the offset form
- LinesScrubber.ReplaceLines: guard the trailing-newline trim on the rebuilt
  builder length, not the original string length, fixing an
  ArgumentOutOfRangeException when every line is replaced with null

Test-framework adapters:
- MSTest Verifier: only apply TestData parameters when their count matches the
  method parameter count (matches XunitV3; params-array DataRows no longer break
  parameterized snapshot naming)
- MSTest Verifier_Archive: forward the dropped archiveExtension in the
  VerifyZip(Stream) overload
- MSTest TestExecutionContext: resolve Method lazily so the method scan runs
  only when a verifier is built
- MSTest source generator: require an attribute list in the syntax predicate so
  the uncached CreateSyntaxProvider transform no longer runs semantic work for
  every class on every keystroke
- NUnit VerifyBase_Tuple: pass sourceFile so snapshots resolve to the test's
  path rather than the package build path
- NUnit VerifyBase_Stream: use settings ?? this.settings in the Task<T> and
  ValueTask<T> stream overloads so instance settings are honored

Add repro tests for the scrubber fixes.
@SimonCropp SimonCropp added this to the 31.22.0 milestone Jul 8, 2026
@SimonCropp SimonCropp merged commit c5532a8 into main Jul 8, 2026
7 checks passed
@SimonCropp SimonCropp deleted the Fix-chunk-boundary-scrubber-bugs-and-test-adapter-defects branch July 8, 2026 21:23
@SimonCropp SimonCropp restored the Fix-chunk-boundary-scrubber-bugs-and-test-adapter-defects branch July 9, 2026 09:28
This was referenced Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants