Unified · Split
| @@ -5,8 +5,10 @@ mod ask { · 4 unmodified lines | ||
| 5 | 5 | #[cfg(unix)] |
| 6 | 6 | fn username_password() { |
| 7 | 7 | let mut cmd = Command::new(env!("CARGO")); |
| 8 | − cmd.args(["run", "--example", "credentials"]); | |
| 9 | − let mut p = expectrl::Session::spawn(cmd).unwrap(); | |
| 8 | + cmd.args(["build", "--example", "credentials"]); | |
| 9 | + cmd.spawn().unwrap().wait().expect("example builds OK"); | |
| 10 | + | |
| 11 | + let mut p = expectrl::spawn("../target/debug/examples/credentials").unwrap(); | |
| 10 | 12 | p.expect("Username: ").unwrap(); |
| 11 | 13 | p.send_line(" user with space ").unwrap(); |
| 12 | 14 | p.expect("\" user with space\"").unwrap(); |