Skip to content

Commit 95a744a

Browse files
committed
wip
1 parent d51e14f commit 95a744a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: tests/basic.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ fn test_cat_blocking() {
1717
assert_eq!(output.next().unwrap(), "foo\r\n");
1818

1919
pty.write_all(&[4u8]).unwrap();
20+
drop(pts);
21+
drop(pty);
2022
let status = child.wait().unwrap();
2123
assert_eq!(status.code().unwrap(), 0);
2224
}
@@ -40,6 +42,7 @@ async fn test_cat_async() {
4042
assert_eq!(output.next().await.unwrap(), "foo\r\n");
4143

4244
pty_w.write_all(&[4u8]).await.unwrap();
45+
drop(pts);
4346
let status = child.wait().await.unwrap();
4447
assert_eq!(status.code().unwrap(), 0);
4548
}
@@ -58,13 +61,15 @@ async fn test_yes_async() {
5861
let bytes = pty.read_buf(&mut &mut buf[..]).await.unwrap();
5962
assert_eq!(&buf[..bytes], b"y\r\n");
6063

61-
let (mut pty_r, _pty_w) = pty.split();
64+
let (mut pty_r, _) = pty.split();
6265
let bytes = pty_r.read_buf(&mut &mut buf[..]).await.unwrap();
6366
assert_eq!(&buf[..bytes], b"y\r\n");
6467

65-
let (mut pty_r, _pty_w) = pty.into_split();
68+
let (mut pty_r, _) = pty.into_split();
6669
let bytes = pty_r.read_buf(&mut &mut buf[..]).await.unwrap();
6770
assert_eq!(&buf[..bytes], b"y\r\n");
6871

69-
child.kill().await.unwrap()
72+
drop(pts);
73+
drop(pty_r);
74+
child.kill().await.unwrap();
7075
}

0 commit comments

Comments
 (0)