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.rs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/helix-term/tests/test/splits.rs b/helix-term/tests/test/splits.rs index 3ba5a504..3b66c048 100644 --- a/helix-term/tests/test/splits.rs +++ b/helix-term/tests/test/splits.rs @@ -62,9 +62,9 @@ async fn test_split_write_quit_all() -> anyhow::Result<()> { ) .await?; - helpers::assert_file_has_content(&mut file1, &LineFeedHandling::Native.apply("hello1"))?; - helpers::assert_file_has_content(&mut file2, &LineFeedHandling::Native.apply("hello2"))?; - helpers::assert_file_has_content(&mut file3, &LineFeedHandling::Native.apply("hello3"))?; + 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"))?; Ok(()) } @@ -91,7 +91,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> { let doc = docs.pop().unwrap(); assert_eq!( - LineFeedHandling::Native.apply("hello\ngoodbye"), + helpers::platform_line("hello\ngoodbye"), doc.text().to_string() ); @@ -110,7 +110,7 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> { let doc = docs.pop().unwrap(); assert_eq!( - LineFeedHandling::Native.apply("hello\ngoodbye"), + helpers::platform_line("hello\ngoodbye"), doc.text().to_string() ); @@ -122,7 +122,10 @@ async fn test_split_write_quit_same_file() -> anyhow::Result<()> { ) .await?; - helpers::assert_file_has_content(&mut file, &LineFeedHandling::Native.apply("hello\ngoodbye"))?; + helpers::assert_file_has_content( + file.as_file_mut(), + &helpers::platform_line("hello\ngoodbye"), + )?; Ok(()) } @@ -148,13 +151,7 @@ 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", - "#[|]#", - LineFeedHandling::AsIs, - )) - .await?; + test(("#[|]#", "<C-w>v[<space><C-s><C-w>wkd<C-w>qd", "#[|]#")).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 @@ -163,7 +160,6 @@ 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?; @@ -189,7 +185,6 @@ 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?; |