Skip to content

Conversation

squeek502
Copy link
Member

@squeek502 squeek502 commented Jun 18, 2023

This is a revival of #15282

Helps mitigate #15976 (and may be enough to warrant closing that issue if we're fine with the .windows_api tty.Config having slightly different behavior than .escape_codes, see the "Potential solutions" at the bottom of that issue)


From #15282 (comment):

The new build runner means that on Windows the SetConsoleTextAttribute colors are not preserved when a test case fails. In combination with #13816 / #13723, this makes the output for expectEqualSlices much less useful.

With the changes in this PR, the colors are preserved (at least with Windows Terminal).

Before this PR:

15206-before

After this PR:

15206-after

nolanderc and others added 2 commits June 17, 2023 23:30
isatty on Windows is implemented as a isCygwinPty call and a GetConsoleMode call, so calling isatty just duplicates the function calls we already need to do in supportsAnsiEscapeCodes.
@andrewrk
Copy link
Member

Thanks!

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.

3 participants