Skip to content

Doesn't work on Windows in GitHub Actions #52

@jwodder

Description

@jwodder

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions