()
| 232 | |
| 233 | #[test] |
| 234 | fn command_run_inherited() { |
| 235 | // Test successful command |
| 236 | Command::new("true").run_inherited().unwrap(); |
| 237 | |
| 238 | // Test failed command |
| 239 | assert!(Command::new("false").run_inherited().is_err()); |
| 240 | |
| 241 | // Test that stderr is not captured (just check error format) |
| 242 | let e = Command::new("/bin/sh") |
| 243 | .args(["-c", "echo should-not-be-captured 1>&2; exit 1"]) |
| 244 | .run_inherited() |
| 245 | .err() |
| 246 | .unwrap(); |
| 247 | // Should not contain the stderr message since it's inherited |
| 248 | assert_eq!( |
| 249 | e.to_string(), |
| 250 | "Subprocess failed: ExitStatus(unix_wait_status(256))" |
| 251 | ); |
| 252 | } |
| 253 | |
| 254 | #[test] |
| 255 | fn command_run_capture_stderr() { |
nothing calls this directly
no test coverage detected