@@ -9,6 +9,7 @@ use codex_exec_server::Environment;
99use codex_exec_server:: ExecBackend ;
1010use codex_exec_server:: ExecParams ;
1111use codex_exec_server:: ExecProcess ;
12+ use codex_exec_server:: ExecStdinMode ;
1213use codex_exec_server:: ProcessId ;
1314use codex_exec_server:: ReadResponse ;
1415use codex_exec_server:: StartedExecProcess ;
@@ -54,6 +55,7 @@ async fn assert_exec_process_starts_and_exits(use_remote: bool) -> Result<()> {
5455 env_policy : /*env_policy*/ None ,
5556 env : Default :: default ( ) ,
5657 tty : false ,
58+ stdin : ExecStdinMode :: Closed ,
5759 arg0 : None ,
5860 } )
5961 . await ?;
@@ -131,6 +133,7 @@ async fn assert_exec_process_streams_output(use_remote: bool) -> Result<()> {
131133 env_policy : /*env_policy*/ None ,
132134 env : Default :: default ( ) ,
133135 tty : false ,
136+ stdin : ExecStdinMode :: Closed ,
134137 arg0 : None ,
135138 } )
136139 . await ?;
@@ -160,7 +163,8 @@ async fn assert_exec_process_write_then_read(use_remote: bool) -> Result<()> {
160163 cwd : std:: env:: current_dir ( ) ?,
161164 env_policy : /*env_policy*/ None ,
162165 env : Default :: default ( ) ,
163- tty : true ,
166+ tty : false ,
167+ stdin : ExecStdinMode :: Piped ,
164168 arg0 : None ,
165169 } )
166170 . await ?;
@@ -172,10 +176,7 @@ async fn assert_exec_process_write_then_read(use_remote: bool) -> Result<()> {
172176 let wake_rx = process. subscribe_wake ( ) ;
173177 let ( output, exit_code, closed) = collect_process_output_from_reads ( process, wake_rx) . await ?;
174178
175- assert ! (
176- output. contains( "from-stdin:hello" ) ,
177- "unexpected output: {output:?}"
178- ) ;
179+ assert_eq ! ( output, "from-stdin:hello\n " ) ;
179180 assert_eq ! ( exit_code, Some ( 0 ) ) ;
180181 assert ! ( closed) ;
181182 Ok ( ( ) )
@@ -198,6 +199,7 @@ async fn assert_exec_process_preserves_queued_events_before_subscribe(
198199 env_policy : /*env_policy*/ None ,
199200 env : Default :: default ( ) ,
200201 tty : false ,
202+ stdin : ExecStdinMode :: Closed ,
201203 arg0 : None ,
202204 } )
203205 . await ?;
@@ -231,6 +233,7 @@ async fn remote_exec_process_reports_transport_disconnect() -> Result<()> {
231233 env_policy : /*env_policy*/ None ,
232234 env : Default :: default ( ) ,
233235 tty : false ,
236+ stdin : ExecStdinMode :: Closed ,
234237 arg0 : None ,
235238 } )
236239 . await ?;
0 commit comments