Skip to content

Use Unicode Control Pictures for special characters in assertions#2734

Open
nohwnd wants to merge 1 commit into
mainfrom
fix/2732-printable-chars
Open

Use Unicode Control Pictures for special characters in assertions#2734
nohwnd wants to merge 1 commit into
mainfrom
fix/2732-printable-chars

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 18, 2026

Copy link
Copy Markdown
Member

Fixes #2732

Replace \n, \r, \t, \0, \b escape sequences in assertion error messages with visible Unicode Control Pictures (U+2400 block): , , , , .

This reuses the existing [Pester.Formatter]::EscapeControlChars() C# implementation (added for #2561) instead of the PowerShell regex chain. The glyphs are single characters, making arrow markers in diff output align correctly without doubling positions.

Replace \n, \r, \t etc. with visible Unicode glyphs (U+2400 block)
in Expand-SpecialCharacters, reusing the existing C# implementation
in [Pester.Formatter]::EscapeControlChars().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

show printable characters instead of \n

1 participant