Skip to content

Commit 7311b74

Browse files
wan9chiclaude
andauthored
test: add pty_terminal_test with milestone supported (#152)
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>
1 parent 1fe363c commit 7311b74

23 files changed

Lines changed: 1350 additions & 442 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CLAUDE.md

Cargo.lock

Lines changed: 38 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const_format = "0.2.34"
5959
constcat = "0.6.1"
6060
copy_dir = "0.1.3"
6161
cow-utils = "0.1.3"
62+
cp_r = "0.5.2"
6263
crossterm = { version = "0.29.0", features = ["event-stream"] }
6364
csv-async = { version = "1.3.1", features = ["tokio"] }
6465
ctor = "0.6"
@@ -89,11 +90,14 @@ os_str_bytes = "7.1.1"
8990
ouroboros = "0.18.5"
9091
owo-colors = "4.1.0"
9192
passfd = { git = "https://github.com/polachok/passfd", rev = "d55881752c16aced1a49a75f9c428d38d3767213", default-features = false }
93+
pathdiff = "0.2.3"
9294
petgraph = "0.8.2"
9395
phf = { version = "0.11.3", features = ["macros"] }
9496
portable-pty = "0.9.0"
9597
pretty_assertions = "1.4.1"
9698
pty_terminal = { path = "crates/pty_terminal" }
99+
pty_terminal_test = { path = "crates/pty_terminal_test" }
100+
pty_terminal_test_client = { path = "crates/pty_terminal_test_client" }
97101
rand = "0.9.1"
98102
ratatui = "0.30.0"
99103
rayon = "1.10.0"

0 commit comments

Comments
 (0)