Consider the following very simple use of expectrl:
use expectrl::{spawn, Error};
use std::time::Duration;
fn main() -> Result<(), Error> {
println!("Spawning ...");
let mut p = spawn("cat")?;
p.set_expect_timeout(Some(Duration::from_secs(3)));
println!("Sending line ...");
p.send_line("Hello World")?;
println!("Expecting line ...");
p.expect("Hello World")?;
println!("OK!");
Ok(())
}
If this program is run in GitHub Actions (using expectrl 0.6.0 and Rust 1.65.0), it succeeds on Ubuntu and macOS but fails on Windows; you can see such a run here. In particular, the output on Windows is:
Spawning ...
Sending line ...
Expecting line ...
Error: ExpectTimeout
Consider the following very simple use of
expectrl:If this program is run in GitHub Actions (using expectrl 0.6.0 and Rust 1.65.0), it succeeds on Ubuntu and macOS but fails on Windows; you can see such a run here. In particular, the output on Windows is: