Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/tests/test/auto_pairs.rs')
| -rw-r--r-- | helix-term/tests/test/auto_pairs.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/helix-term/tests/test/auto_pairs.rs b/helix-term/tests/test/auto_pairs.rs index ada488fc..c921e2ae 100644 --- a/helix-term/tests/test/auto_pairs.rs +++ b/helix-term/tests/test/auto_pairs.rs @@ -19,6 +19,7 @@ async fn insert_basic() -> anyhow::Result<()> { format!("#[{}|]#", LINE_END), format!("i{}", pair.0), format!("{}#[|{}]#{}", pair.0, pair.1, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -46,6 +47,7 @@ async fn insert_configured_multi_byte_chars() -> anyhow::Result<()> { format!("#[{}|]#", LINE_END), format!("i{}", open), format!("{}#[|{}]#{}", open, close, LINE_END), + LineFeedHandling::AsIs, ), ) .await?; @@ -56,6 +58,7 @@ async fn insert_configured_multi_byte_chars() -> anyhow::Result<()> { format!("{}#[{}|]#{}", open, close, LINE_END), format!("i{}", close), format!("{}{}#[|{}]#", open, close, LINE_END), + LineFeedHandling::AsIs, ), ) .await?; @@ -71,6 +74,7 @@ async fn insert_after_word() -> anyhow::Result<()> { format!("foo#[{}|]#", LINE_END), format!("i{}", pair.0), format!("foo{}#[|{}]#{}", pair.0, pair.1, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -80,6 +84,7 @@ async fn insert_after_word() -> anyhow::Result<()> { format!("foo#[{}|]#", LINE_END), format!("i{}", pair.0), format!("foo{}#[|{}]#", pair.0, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -94,6 +99,7 @@ async fn insert_before_word() -> anyhow::Result<()> { format!("#[f|]#oo{}", LINE_END), format!("i{}", pair.0), format!("{}#[|f]#oo{}", pair.0, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -108,6 +114,7 @@ async fn insert_before_word_selection() -> anyhow::Result<()> { format!("#[foo|]#{}", LINE_END), format!("i{}", pair.0), format!("{}#[|foo]#{}", pair.0, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -122,6 +129,7 @@ async fn insert_before_word_selection_trailing_word() -> anyhow::Result<()> { format!("foo#[ wor|]#{}", LINE_END), format!("i{}", pair.0), format!("foo{}#[|{} wor]#{}", pair.0, pair.1, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -136,6 +144,7 @@ async fn insert_closer_selection_trailing_word() -> anyhow::Result<()> { format!("foo{}#[|{} wor]#{}", pair.0, pair.1, LINE_END), format!("i{}", pair.1), format!("foo{}{}#[| wor]#{}", pair.0, pair.1, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -155,6 +164,7 @@ async fn insert_before_eol() -> anyhow::Result<()> { open = pair.0, close = pair.1 ), + LineFeedHandling::AsIs, )) .await?; } @@ -177,6 +187,7 @@ async fn insert_auto_pairs_disabled() -> anyhow::Result<()> { format!("#[{}|]#", LINE_END), format!("i{}", pair.0), format!("{}#[|{}]#", pair.0, LINE_END), + LineFeedHandling::AsIs, ), ) .await?; @@ -197,6 +208,7 @@ async fn insert_multi_range() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -211,6 +223,7 @@ async fn insert_before_multi_code_point_graphemes() -> anyhow::Result<()> { format!("hello #[๐จโ๐ฉโ๐งโ๐ฆ|]# goodbye{}", LINE_END), format!("i{}", pair.1), format!("hello {}#[|๐จโ๐ฉโ๐งโ๐ฆ]# goodbye{}", pair.1, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -226,6 +239,7 @@ async fn insert_at_end_of_document() -> anyhow::Result<()> { in_keys: format!("i{}", pair.0), out_text: format!("{}{}{}", LINE_END, pair.0, pair.1), out_selection: Selection::single(LINE_END.len() + 1, LINE_END.len() + 2), + line_feed_handling: LineFeedHandling::AsIs, }) .await?; @@ -235,6 +249,7 @@ async fn insert_at_end_of_document() -> anyhow::Result<()> { in_keys: format!("i{}", pair.0), out_text: format!("foo{}{}{}", LINE_END, pair.0, pair.1), out_selection: Selection::single(LINE_END.len() + 4, LINE_END.len() + 5), + line_feed_handling: LineFeedHandling::AsIs, }) .await?; } @@ -259,6 +274,7 @@ async fn insert_close_inside_pair() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -283,6 +299,7 @@ async fn insert_close_inside_pair_multi() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -307,6 +324,7 @@ async fn insert_nested_open_inside_pair() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -338,6 +356,7 @@ async fn insert_nested_open_inside_pair_multi() -> anyhow::Result<()> { inner_close = inner_pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -358,6 +377,7 @@ async fn append_basic() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -377,6 +397,7 @@ async fn append_multi_range() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -401,6 +422,7 @@ async fn append_close_inside_pair() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -425,6 +447,7 @@ async fn append_close_inside_pair_multi() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -444,6 +467,7 @@ async fn append_end_of_word() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -458,6 +482,7 @@ async fn append_middle_of_word() -> anyhow::Result<()> { format!("#[wo|]#rd{}", LINE_END), format!("a{}", pair.1), format!("#[wo{}r|]#d{}", pair.1, LINE_END), + LineFeedHandling::AsIs, )) .await?; } @@ -477,6 +502,7 @@ async fn append_end_of_word_multi() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -501,6 +527,7 @@ async fn append_inside_nested_pair() -> anyhow::Result<()> { close = pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } @@ -532,6 +559,7 @@ async fn append_inside_nested_pair_multi() -> anyhow::Result<()> { inner_close = inner_pair.1, eol = LINE_END ), + LineFeedHandling::AsIs, )) .await?; } |