@@ -17,6 +17,8 @@ fn test_cat_blocking() {
17
17
assert_eq ! ( output. next( ) . unwrap( ) , "foo\r \n " ) ;
18
18
19
19
pty. write_all ( & [ 4u8 ] ) . unwrap ( ) ;
20
+ drop ( pts) ;
21
+ drop ( pty) ;
20
22
let status = child. wait ( ) . unwrap ( ) ;
21
23
assert_eq ! ( status. code( ) . unwrap( ) , 0 ) ;
22
24
}
@@ -40,6 +42,7 @@ async fn test_cat_async() {
40
42
assert_eq ! ( output. next( ) . await . unwrap( ) , "foo\r \n " ) ;
41
43
42
44
pty_w. write_all ( & [ 4u8 ] ) . await . unwrap ( ) ;
45
+ drop ( pts) ;
43
46
let status = child. wait ( ) . await . unwrap ( ) ;
44
47
assert_eq ! ( status. code( ) . unwrap( ) , 0 ) ;
45
48
}
@@ -58,13 +61,15 @@ async fn test_yes_async() {
58
61
let bytes = pty. read_buf ( & mut & mut buf[ ..] ) . await . unwrap ( ) ;
59
62
assert_eq ! ( & buf[ ..bytes] , b"y\r \n " ) ;
60
63
61
- let ( mut pty_r, _pty_w ) = pty. split ( ) ;
64
+ let ( mut pty_r, _ ) = pty. split ( ) ;
62
65
let bytes = pty_r. read_buf ( & mut & mut buf[ ..] ) . await . unwrap ( ) ;
63
66
assert_eq ! ( & buf[ ..bytes] , b"y\r \n " ) ;
64
67
65
- let ( mut pty_r, _pty_w ) = pty. into_split ( ) ;
68
+ let ( mut pty_r, _ ) = pty. into_split ( ) ;
66
69
let bytes = pty_r. read_buf ( & mut & mut buf[ ..] ) . await . unwrap ( ) ;
67
70
assert_eq ! ( & buf[ ..bytes] , b"y\r \n " ) ;
68
71
69
- child. kill ( ) . await . unwrap ( )
72
+ drop ( pts) ;
73
+ drop ( pty_r) ;
74
+ child. kill ( ) . await . unwrap ( ) ;
70
75
}
0 commit comments