mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
io: add SyncIOBridge::into_inner (#5971)
This commit is contained in:
@@ -43,6 +43,18 @@ async fn test_async_write_to_sync() -> Result<(), Box<dyn Error>> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_into_inner() -> Result<(), Box<dyn Error>> {
|
||||
let mut buf = Vec::new();
|
||||
SyncIoBridge::new(tokio::io::empty())
|
||||
.into_inner()
|
||||
.read_to_end(&mut buf)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(buf.len(), 0);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_shutdown() -> Result<(), Box<dyn Error>> {
|
||||
let (s1, mut s2) = tokio::io::duplex(1024);
|
||||
|
||||
Reference in New Issue
Block a user