From 6dc9644d1e793243aa8377e08a94a172aeb7f149 Mon Sep 17 00:00:00 2001 From: Jonatan Pettersson Date: Tue, 3 Sep 2024 12:41:57 +0200 Subject: [PATCH] Set default line ending to LF in tests --- helix-term/tests/test/lsp/code_actions_on_save.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helix-term/tests/test/lsp/code_actions_on_save.rs b/helix-term/tests/test/lsp/code_actions_on_save.rs index b5cf5a43f..51e3dbad1 100644 --- a/helix-term/tests/test/lsp/code_actions_on_save.rs +++ b/helix-term/tests/test/lsp/code_actions_on_save.rs @@ -74,6 +74,7 @@ async fn test_organize_imports_go() -> anyhow::Result<()> { .with_config(Config { editor: helix_view::editor::Config { idle_timeout: IDLE_TIMEOUT, + default_line_ending: helix_view::editor::LineEndingConfig::LF, ..Default::default() }, ..Default::default() @@ -133,6 +134,7 @@ async fn test_organize_imports_go_write_all_quit() -> anyhow::Result<()> { .with_config(Config { editor: helix_view::editor::Config { idle_timeout: IDLE_TIMEOUT, + default_line_ending: helix_view::editor::LineEndingConfig::LF, ..Default::default() }, ..Default::default() @@ -170,10 +172,7 @@ async fn test_organize_imports_go_write_all_quit() -> anyhow::Result<()> { "package main\n\nimport (\n\t\"fmt\"\n\t\"path\"\n)\n\nfunc main() {\n\tfmt.Println(\"a\")\n\tpath.Join(\"b\")\n}\n", )?; - assert_file_has_content( - &mut file2, - &LineFeedHandling::Native.apply("package main\n\nfunc test()\n"), - )?; + assert_file_has_content(&mut file2, "package main\n\nfunc test()\n")?; Ok(()) } @@ -205,6 +204,7 @@ async fn test_invalid_code_action_go() -> anyhow::Result<()> { .with_config(Config { editor: helix_view::editor::Config { idle_timeout: IDLE_TIMEOUT, + default_line_ending: helix_view::editor::LineEndingConfig::LF, ..Default::default() }, ..Default::default()