Skip to content

Commit 467c7dd

Browse files
committed
wip
1 parent 79592a3 commit 467c7dd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/fds_async.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ mod helpers;
55
fn test_fds_async() {
66
use futures::stream::StreamExt as _;
77

8-
check_open_fds(&[0, 1, 2]);
8+
let mut expected = String::new();
9+
for fd in get_open_fds() {
10+
expected.push_str(&format!("{}", fd));
11+
}
912

1013
let rt = tokio::runtime::Builder::new_multi_thread()
1114
.enable_all()
@@ -31,7 +34,7 @@ fn test_fds_async() {
3134

3235
let (pty_r, _) = pty.split();
3336
let mut output = helpers::output_async(pty_r);
34-
assert_eq!(output.next().await.unwrap(), "012\r\n");
37+
assert_eq!(output.next().await.unwrap(), format!("{expected}\r\n"));
3538

3639
let status = child.wait().await.unwrap();
3740
assert_eq!(status.code().unwrap(), 0);
@@ -56,7 +59,7 @@ fn test_fds_async() {
5659

5760
let (pty_r, _) = pty.split();
5861
let mut output = helpers::output_async(pty_r);
59-
assert_eq!(output.next().await.unwrap(), "012\r\n");
62+
assert_eq!(output.next().await.unwrap(), format!("{expected}\r\n"));
6063

6164
let status = child.wait().await.unwrap();
6265
assert_eq!(status.code().unwrap(), 0);
@@ -81,7 +84,7 @@ fn test_fds_async() {
8184

8285
let (pty_r, _) = pty.split();
8386
let mut output = helpers::output_async(pty_r);
84-
assert_eq!(output.next().await.unwrap(), "012\r\n");
87+
assert_eq!(output.next().await.unwrap(), format!("{expected}\r\n"));
8588

8689
let status = child.wait().await.unwrap();
8790
assert_eq!(status.code().unwrap(), 0);

0 commit comments

Comments
 (0)