diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-08-06 19:59:57 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2023-08-06 19:59:57 -0400 |
commit | 7d3c64ffd2a21b82ec3b40834af090bb6523ce9b (patch) | |
tree | 288c8ca98d0e10e1e216b07542abf0fbba6f1f75 /tests/fds.rs | |
parent | 506d17f6caebcb9c72471a496a5cc0d9d852eb2b (diff) | |
download | pty-process-7d3c64ffd2a21b82ec3b40834af090bb6523ce9b.tar.gz pty-process-7d3c64ffd2a21b82ec3b40834af090bb6523ce9b.zip |
also fix up the test output checks
Diffstat (limited to 'tests/fds.rs')
-rw-r--r-- | tests/fds.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/fds.rs b/tests/fds.rs index 61fd472..a072261 100644 --- a/tests/fds.rs +++ b/tests/fds.rs @@ -3,6 +3,9 @@ mod helpers; #[test] fn test_fds() { let fds = check_open_fds(None); + let fds_strings: Vec<String> = + fds.iter().map(std::string::ToString::to_string).collect(); + let expected_output = format!("{}\r\n", fds_strings.join("")); let pty = pty_process::blocking::Pty::new().unwrap(); let pts = pty.pts().unwrap(); @@ -13,7 +16,7 @@ fn test_fds() { .unwrap(); let mut output = helpers::output(&pty); - assert_eq!(output.next().unwrap(), "012\r\n"); + assert_eq!(output.next().unwrap(), expected_output); let status = child.wait().unwrap(); assert_eq!(status.code().unwrap(), 0); @@ -31,7 +34,7 @@ fn test_fds() { .unwrap(); let mut output = helpers::output(&pty); - assert_eq!(output.next().unwrap(), "012\r\n"); + assert_eq!(output.next().unwrap(), expected_output); let status = child.wait().unwrap(); assert_eq!(status.code().unwrap(), 0); |