rust-cli / rexpect

.github/workflows/ci.yml
https://docs.rs/rexpect
MIT License
328 stars 56 forks source link

rexpect::spawn with empty program parameter #19

Closed zhiburt closed 4 years ago

zhiburt commented 4 years ago
    #[test]
    fn test_empty_spawn() {
        let p = spawn("", Some(1000));
        assert!(p.is_ok());
    }

Currently such spawn will produce a correct PtySession but any work with it it's obviously not a good idea. I wonder if the spawn function have to check the input if it's empty and return the error in such case. If it's I may provide a PR :)

I am not sure what is a relatively good step here. So create an issue rather than PR :)