Skip to content

Commit 9aa929d

Browse files
branchseerclaude
andcommitted
feat(e2e): add interactive TTY mode with expectrl for stdin testing
Add support for interactive TTY mode in e2e test runner using expectrl crate. This enables tests to simulate interactive stdin input through a PTY pseudo-terminal. Key changes: - Modified Step enum: `stdin: Str` → `interactive: bool` - Added run_interactive_step function using sync expectrl with spawn_blocking - Implemented [write-stdin:...] protocol for writing to stdin - Empty content [write-stdin:] signals EOF (sends Ctrl-D) - Updated stdin-passthrough fixture to use new protocol - Created echo-stdin.js script that verifies TTY mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 348e914 commit 9aa929d

9 files changed

Lines changed: 463 additions & 100 deletions

File tree

Cargo.lock

Lines changed: 182 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ allocator-api2 = { version = "0.2.21", default-features = false, features = ["al
3737
anyhow = "1.0.98"
3838
assert2 = "0.3.16"
3939
assertables = "9.8.1"
40+
async-compat = "0.2"
4041
async-trait = "0.1.89"
4142
base64 = "0.22.1"
4243
bincode = "2.0.1"
@@ -63,6 +64,7 @@ derive_more = "2.0.1"
6364
diff-struct = "0.5.3"
6465
directories = "6.0.0"
6566
elf = { version = "0.8.0", default-features = false }
67+
expectrl = "0.8.0"
6668
flate2 = "1.0.35"
6769
fspy = { path = "crates/fspy" }
6870
fspy_detours_sys = { path = "crates/fspy_detours_sys" }
@@ -73,6 +75,7 @@ fspy_shared = { path = "crates/fspy_shared" }
7375
fspy_shared_unix = { path = "crates/fspy_shared_unix" }
7476
fspy_test_utils = { path = "crates/fspy_test_utils" }
7577
futures = "0.3.31"
78+
futures-lite = "1.13.0"
7679
futures-util = "0.3.31"
7780
insta = "1.44.3"
7881
libc = "0.2.172"

crates/vite_task_bin/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ vite_task = { workspace = true }
2222
which = { workspace = true }
2323

2424
[dev-dependencies]
25+
async-compat = { workspace = true }
2526
copy_dir = { workspace = true }
2627
cow-utils = { workspace = true }
28+
expectrl = { workspace = true }
29+
futures-lite = { workspace = true }
2730
insta = { workspace = true, features = ["glob", "json", "redactions", "filters", "ron"] }
31+
nix = { workspace = true }
2832
regex = { workspace = true }
2933
serde = { workspace = true, features = ["derive", "rc"] }
3034
tempfile = { workspace = true }

0 commit comments

Comments
 (0)