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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4382
Author: @zadjii-msft
Created: 1/28/2020
Status: Merged
Merged: 1/29/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/just-conpty-test-fixes


📝 Commits (3)

  • ce3138c Let's pull all the test fixes into their own file
  • 2daec48 Merge remote-tracking branch 'origin/master' into dev/migrie/b/just-conpty-test-fixes
  • 96e16fd Do a string replace to escape the escape characters

📊 Changes

15 files changed (+365 additions, -99 deletions)

View changed files

📝 src/cascadia/TerminalCore/Terminal.hpp (+7 -2)
📝 src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp (+62 -86)
src/cascadia/UnitTests_TerminalCore/TerminalBufferTests.cpp (+68 -0)
src/cascadia/UnitTests_TerminalCore/TestUtils.h (+138 -0)
📝 src/cascadia/UnitTests_TerminalCore/UnitTests.vcxproj (+1 -0)
📝 src/host/ConsoleArguments.cpp (+14 -0)
📝 src/host/ConsoleArguments.hpp (+4 -0)
📝 src/host/VtIo.cpp (+15 -0)
📝 src/host/VtIo.hpp (+4 -0)
📝 src/host/globals.cpp (+16 -0)
📝 src/host/globals.h (+4 -0)
📝 src/host/screenInfo.hpp (+9 -1)
📝 src/host/ut_host/ConptyOutputTests.cpp (+5 -0)
📝 src/inc/test/CommonState.hpp (+13 -8)
📝 src/renderer/vt/vtrenderer.hpp (+5 -2)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4382 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 1/28/2020 **Status:** ✅ Merged **Merged:** 1/29/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/just-conpty-test-fixes` --- ### 📝 Commits (3) - [`ce3138c`](https://github.com/microsoft/terminal/commit/ce3138c6853840e6e1bf4f13c374501cbf26a352) Let's pull all the test fixes into their own file - [`2daec48`](https://github.com/microsoft/terminal/commit/2daec486dcae0ad127733d68a9a5bd00aa49b967) Merge remote-tracking branch 'origin/master' into dev/migrie/b/just-conpty-test-fixes - [`96e16fd`](https://github.com/microsoft/terminal/commit/96e16fdda578e999b48217362273055e2dc0686d) Do a string replace to escape the escape characters ### 📊 Changes **15 files changed** (+365 additions, -99 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+7 -2) 📝 `src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp` (+62 -86) ➕ `src/cascadia/UnitTests_TerminalCore/TerminalBufferTests.cpp` (+68 -0) ➕ `src/cascadia/UnitTests_TerminalCore/TestUtils.h` (+138 -0) 📝 `src/cascadia/UnitTests_TerminalCore/UnitTests.vcxproj` (+1 -0) 📝 `src/host/ConsoleArguments.cpp` (+14 -0) 📝 `src/host/ConsoleArguments.hpp` (+4 -0) 📝 `src/host/VtIo.cpp` (+15 -0) 📝 `src/host/VtIo.hpp` (+4 -0) 📝 `src/host/globals.cpp` (+16 -0) 📝 `src/host/globals.h` (+4 -0) 📝 `src/host/screenInfo.hpp` (+9 -1) 📝 `src/host/ut_host/ConptyOutputTests.cpp` (+5 -0) 📝 `src/inc/test/CommonState.hpp` (+13 -8) 📝 `src/renderer/vt/vtrenderer.hpp` (+5 -2) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:11:24 +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#25726