summaryrefslogtreecommitdiff
path: root/helix-term/tests/test/commands.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-08-24 05:13:41 +0000
committerSkyler Hawthorne2022-10-19 02:31:39 +0000
commit57de4e62519a59aece104867569c2b9ad044af54 (patch)
tree8ab5a88dbdad6f64073aae48a49d13f996ad83eb /helix-term/tests/test/commands.rs
parent7b11e9ac6941188c6f6148961fdd97e34988490e (diff)
various fixes in write-all path
Diffstat (limited to 'helix-term/tests/test/commands.rs')
-rw-r--r--helix-term/tests/test/commands.rs12
1 files changed, 2 insertions, 10 deletions
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(())
}