diff --git a/helix-term/tests/test/comments.rs b/helix-term/tests/test/comments.rs index d631d9880..feed59800 100644 --- a/helix-term/tests/test/comments.rs +++ b/helix-term/tests/test/comments.rs @@ -86,6 +86,93 @@ async fn test_injected_comment_tokens_simple() -> anyhow::Result<()> { Ok(()) } +#[tokio::test(flavor = "multi_thread")] +async fn test_injected_comment_tokens_continue_comment() -> anyhow::Result<()> { + test(( + indoc! {r#"\ +
Some text 1234
+ + "#}, + ":lang htmlSome text 1234
+ + "#}, + )) + .await?; + + test(( + indoc! {r#"\ +Some text 1234
+ + "#}, + ":lang htmlSome text 1234
+ + "#}, + )) + .await?; + + test(( + indoc! {r#"\ +Some text 1234
+ + "#}, + ":lang htmlSome text 1234
+ + "#}, + )) + .await?; + + test(( + indoc! {r#"\ +Some text 1234
+ + "#}, + ":lang htmlSome text 1234
+ + "#}, + )) + .await?; + + Ok(()) +} + /// Selections in different regions #[tokio::test(flavor = "multi_thread")] async fn test_injected_comment_tokens_multiple_selections() -> anyhow::Result<()> {