From 57de4e62519a59aece104867569c2b9ad044af54 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Wed, 24 Aug 2022 01:13:41 -0400 Subject: various fixes in write-all path --- helix-term/tests/test/commands.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'helix-term/tests/test/commands.rs') diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index b7c0f7cc..0279e348 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -1,7 +1,4 @@ -use std::{ - io::{Read, Write}, - ops::RangeInclusive, -}; +use std::ops::RangeInclusive; use helix_core::diagnostic::Severity; use helix_term::application::Application; @@ -86,12 +83,7 @@ async fn test_buffer_close_concurrent() -> anyhow::Result<()> { ) .await?; - file.as_file_mut().flush()?; - file.as_file_mut().sync_all()?; - - let mut file_content = String::new(); - file.as_file_mut().read_to_string(&mut file_content)?; - assert_eq!(RANGE.end().to_string(), file_content); + helpers::assert_file_has_content(file.as_file_mut(), &RANGE.end().to_string())?; Ok(()) } -- cgit v1.2.3-70-g09d2