Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/tests/test/splits.rs')
-rw-r--r--helix-term/tests/test/splits.rs31
1 files changed, 24 insertions, 7 deletions
diff --git a/helix-term/tests/test/splits.rs b/helix-term/tests/test/splits.rs
index 3b66c048..f19e3004 100644
--- a/helix-term/tests/test/splits.rs
+++ b/helix-term/tests/test/splits.rs
@@ -62,9 +62,18 @@ async fn test_split_write_quit_all() -> anyhow::Result<()> {
)
.await?;
- helpers::assert_file_has_content(file1.as_file_mut(), &platform_line("hello1"))?;
- helpers::assert_file_has_content(file2.as_file_mut(), &platform_line("hello2"))?;
- helpers::assert_file_has_content(file3.as_file_mut(), &platform_line("hello3"))?;
+ helpers::assert_file_has_content(
+ file1.as_file_mut(),
+ &LineFeedHandling::Native.apply("hello1"),
+ )?;
+ helpers::assert_file_has_content(
+ file2.as_file_mut(),
+ &LineFeedHandling::Native.apply("hello2"),
+ )?;
+ helpers::assert_file_has_content(
+ file3.as_file_mut(),
+ &LineFeedHandling::Native.apply("hello3"),
+ )?;
Ok(())
}
@@ -91,7 +100,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> {
let doc = docs.pop().unwrap();
assert_eq!(
- helpers::platform_line("hello\ngoodbye"),
+ LineFeedHandling::Native.apply("hello\ngoodbye"),
doc.text().to_string()
);
@@ -110,7 +119,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> {
let doc = docs.pop().unwrap();
assert_eq!(
- helpers::platform_line("hello\ngoodbye"),
+ LineFeedHandling::Native.apply("hello\ngoodbye"),
doc.text().to_string()
);
@@ -124,7 +133,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> {
helpers::assert_file_has_content(
file.as_file_mut(),
- &helpers::platform_line("hello\ngoodbye"),
+ &LineFeedHandling::Native.apply("hello\ngoodbye"),
)?;
Ok(())
@@ -151,7 +160,13 @@ async fn test_changes_in_splits_apply_to_all_views() -> anyhow::Result<()> {
//
// This panicked in the past because the jumplist entry on line 2 of window 2
// was not updated and after the `kd` step, pointed outside of the document.
- test(("#[|]#", "<C-w>v[<space><C-s><C-w>wkd<C-w>qd", "#[|]#")).await?;
+ test((
+ "#[|]#",
+ "<C-w>v[<space><C-s><C-w>wkd<C-w>qd",
+ "#[|]#",
+ LineFeedHandling::AsIs,
+ ))
+ .await?;
// Transactions are applied to the views for windows lazily when they are focused.
// This case panics if the transactions and inversions are not applied in the
@@ -160,6 +175,7 @@ async fn test_changes_in_splits_apply_to_all_views() -> anyhow::Result<()> {
"#[|]#",
"[<space>[<space>[<space><C-w>vuuu<C-w>wUUU<C-w>quuu",
"#[|]#",
+ LineFeedHandling::AsIs,
))
.await?;
@@ -185,6 +201,7 @@ async fn test_changes_in_splits_apply_to_all_views() -> anyhow::Result<()> {
"#[|]#",
"3[<space><C-w>v<C-s><C-w>wuu3[<space><C-w>q%d",
"#[|]#",
+ LineFeedHandling::AsIs,
))
.await?;