diff options
Diffstat (limited to 'helix-term/tests/test/commands.rs')
-rw-r--r-- | helix-term/tests/test/commands.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index 0cd79bc7..f7ce9af0 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -91,3 +91,43 @@ async fn test_buffer_close_concurrent() -> anyhow::Result<()> { Ok(()) } + +#[tokio::test] +async fn test_selection_duplication() -> anyhow::Result<()> { + // Forward + test(( + platform_line(indoc! {"\ + #[lo|]#rem + ipsum + dolor + "}) + .as_str(), + "CC", + platform_line(indoc! {"\ + #(lo|)#rem + #(ip|)#sum + #[do|]#lor + "}) + .as_str(), + )) + .await?; + + // Backward + test(( + platform_line(indoc! {"\ + #[|lo]#rem + ipsum + dolor + "}) + .as_str(), + "CC", + platform_line(indoc! {"\ + #(|lo)#rem + #(|ip)#sum + #[|do]#lor + "}) + .as_str(), + )) + .await?; + Ok(()) +} |