aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test
diff options
context:
space:
mode:
authorwoojiq2023-09-03 21:12:38 +0000
committerGitHub2023-09-03 21:12:38 +0000
commitbb3e6998e641f25f3f73d0805522b451c18ac633 (patch)
treefcddfcc5a2ff3827914773e1ea9e196b7e2be6b5 /helix-term/tests/test
parenta38ec6d6ca9e5dbbd2e313f3173f2e967ed71fc1 (diff)
Fix find commands for buffers with non-LF line-endings (#8111)
Diffstat (limited to 'helix-term/tests/test')
-rw-r--r--helix-term/tests/test/movement.rs39
1 files changed, 39 insertions, 0 deletions
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"
+ }),
+ "T<ret>gll2f<ret>",
+ helpers::platform_line(indoc! {
+ "\
+ one
+ two#[
+ |]#three"
+ }),
+ ))
+ .await?;
+
+ test((
+ helpers::platform_line(indoc! {
+ "\
+ #[|o]#ne
+ two
+ three"
+ }),
+ "f<ret>2t<ret>ghT<ret>F<ret>",
+ helpers::platform_line(indoc! {
+ "\
+ one#[|
+ t]#wo
+ three"
+ }),
+ ))
+ .await?;
+
+ Ok(())
+}