Use constrained PowerShell-safe test output

This commit is contained in:
pakrym-oai
2026-05-08 06:43:38 -07:00
parent 977e1474e8
commit 14b7cd639b
@@ -198,7 +198,7 @@ fn legacy_non_tty_powershell_emits_output() {
"-NonInteractive".to_string(),
"-NoProfile".to_string(),
"-Command".to_string(),
"[Console]::Out.WriteLine('LEGACY-NONTTY-DIRECT')".to_string(),
"'LEGACY-NONTTY-DIRECT'".to_string(),
],
cwd.as_path(),
HashMap::new(),
@@ -386,7 +386,7 @@ fn legacy_capture_powershell_emits_output() {
"-NonInteractive".to_string(),
"-NoProfile".to_string(),
"-Command".to_string(),
"[Console]::Out.WriteLine('LEGACY-CAPTURE-DIRECT')".to_string(),
"'LEGACY-CAPTURE-DIRECT'".to_string(),
],
cwd.as_path(),
HashMap::new(),
@@ -428,7 +428,7 @@ fn legacy_tty_powershell_emits_output_and_accepts_input() {
"-NoProfile".to_string(),
"-NoExit".to_string(),
"-Command".to_string(),
"$PID; [Console]::Out.WriteLine('ready')".to_string(),
"$PID; 'ready'".to_string(),
],
cwd.as_path(),
HashMap::new(),
@@ -443,7 +443,7 @@ fn legacy_tty_powershell_emits_output_and_accepts_input() {
let writer = spawned.session.writer_sender();
writer
.send(b"[Console]::Out.WriteLine('second')\n".to_vec())
.send(b"'second'\n".to_vec())
.await
.expect("send second command");
writer