From bb3e6998e641f25f3f73d0805522b451c18ac633 Mon Sep 17 00:00:00 2001 From: woojiq Date: Mon, 4 Sep 2023 00:12:38 +0300 Subject: Fix find commands for buffers with non-LF line-endings (#8111) --- helix-term/tests/test/movement.rs | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'helix-term/tests') diff --git a/helix-term/tests/test/movement.rs b/helix-term/tests/test/movement.rs index 9a48cdbc..e3c2668d 100644 --- a/helix-term/tests/test/movement.rs +++ b/helix-term/tests/test/movement.rs @@ -513,3 +513,42 @@ async fn select_mode_tree_sitter_prev_function_goes_backwards_to_object() -> any Ok(()) } + +#[tokio::test(flavor = "multi_thread")] +async fn find_char_line_ending() -> anyhow::Result<()> { + test(( + helpers::platform_line(indoc! { + "\ + one + #[|t]#wo + three" + }), + "Tgll2f", + helpers::platform_line(indoc! { + "\ + one + two#[ + |]#three" + }), + )) + .await?; + + test(( + helpers::platform_line(indoc! { + "\ + #[|o]#ne + two + three" + }), + "f2tghTF", + helpers::platform_line(indoc! { + "\ + one#[| + t]#wo + three" + }), + )) + .await?; + + Ok(()) +} -- cgit v1.2.3-70-g09d2