[PR #4382] Add just the test infrastructure bits from #4354 #25731

Closed
opened 2026-01-31 09:11:26 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4382

State: closed
Merged: Yes


Summary of the Pull Request

#4354 is a pretty complicated PR. It's got a bunch of conpty changes, but what it also has was some critical improvements to the roundtrip test suite. I'm working on some other bugfixes in the same area currently, and need these tests enhancements in those branches now. The rest of #4354 is complex enough that I don't trust it will get merged soon (if ever). However, these fixes should be in regardless.

PR Checklist

  • Taken directly from #4354
  • I work here
  • Tests added/passed
  • [n/a] Requires documentation to be updated

Detailed Description of the Pull Request / Additional comments

This is four main changes:

  • Enable conpty to be fully enabled in unittests. Just setting up a VT renderer isn't enough to trick the host into being in conpty mode - it also needs to have some other flags set.
  • Some minor changes to CommonState to better configure the common test state for conpty
  • Move some of the verify helpers from ConptyRoundtripTests into their own helper class, to be shared in multiple tests
  • Add a TerminalBufferTests class, for testing the Terminal buffer directly (without conpty).

This change is really easier than
image
would suggest, I promise.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4382 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request #4354 is a pretty complicated PR. It's got a bunch of conpty changes, but what it also has was some critical improvements to the roundtrip test suite. I'm working on some other bugfixes in the same area currently, and need these tests enhancements in those branches _now_. The rest of #4354 is complex enough that I don't trust it will get merged soon (if ever). However, these fixes _should_ be in regardless. ## PR Checklist * [x] Taken directly from #4354 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments This is four main changes: * Enable conpty to be fully enabled in unittests. Just setting up a VT renderer isn't enough to trick the host into being in conpty mode - it also needs to have some other flags set. * Some minor changes to `CommonState` to better configure the common test state for conpty * Move some of the verify helpers from `ConptyRoundtripTests` into their own helper class, to be shared in multiple tests * Add a `TerminalBufferTests` class, for testing the Terminal buffer directly (without conpty). This change is really easier than ![image](https://user-images.githubusercontent.com/18356694/73278427-2d1b4480-41b1-11ea-9bbe-70671c557f49.png) would suggest, I promise.
claunia added the pull-request label 2026-01-31 09:11:26 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25731