test: add pty_terminal_test with milestone supported#152
Merged
branchseer merged 24 commits intomainfrom Feb 12, 2026
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Member
Author
Merge activity
|
Decompose the monolithic Terminal struct into focused components: - PtyStream: combined reader/writer (impl Read + Write) with vt100 parser, screen_contents(), resize(), send_ctrl_c(), write_line() - ChildHandle: cloneable child process handle with wait() and kill() - Terminal: thin wrapper with pub pty_stream and child_handle fields Drop custom read_until/read_to_end methods in favor of std::io traits. Remove 7 read_until-specific tests; adapt remaining 9 tests to use BufReader<&mut PtyStream>::read_until for synchronization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Share vt100 parser via Arc<Mutex<...>> between reader and writer, allowing independent mutable borrows in tests without scoped BufReader workarounds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pty_terminal_test and pty_terminal_test_client crates for robust PTY test synchronization using OSC escape sequences. The child process emits named milestones via OSC 9999, and the test harness waits for them to return screen contents at that point. On Windows, ConPTY delivers unrecognized OSC sequences via a fast pass-through path that may arrive before rendered character output. Each milestone also moves the cursor to a counter-based unique column on the last row; since cursor movement goes through ConPTY's rendering pipeline, waiting for the cursor position guarantees all preceding character output has been consumed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
93d9ffe to
307e9ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Decompose the monolithic Terminal struct into focused components:
parser, screen_contents(), resize(), send_ctrl_c(), write_line()
Drop custom read_until/read_to_end methods in favor of std::io traits.
Remove 7 read_until-specific tests; adapt remaining 9 tests to use
BufReader<&mut PtyStream>::read_until for synchronization.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com