mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
@@ -37,6 +37,19 @@ async fn basic_write() {
|
||||
assert_eq!(file, HELLO);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn basic_write_and_shutdown() {
|
||||
let tempfile = tempfile();
|
||||
|
||||
let mut file = File::create(tempfile.path()).await.unwrap();
|
||||
|
||||
file.write_all(HELLO).await.unwrap();
|
||||
file.shutdown().await.unwrap();
|
||||
|
||||
let file = std::fs::read(tempfile.path()).unwrap();
|
||||
assert_eq!(file, HELLO);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn coop() {
|
||||
let mut tempfile = tempfile();
|
||||
|
||||
Reference in New Issue
Block a user