Skip to content

Commit

Permalink
Make tests line-ending agnostic
Browse files Browse the repository at this point in the history
Make tests line-ending agnostic

Use indoc to fix tests

Fix line-ending on test input
  • Loading branch information
A-Walrus committed Jul 3, 2022
1 parent fffcfbc commit 07db29a
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions helix-term/tests/test/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,37 @@ async fn test_buffer_close_concurrent() -> anyhow::Result<()> {
async fn test_selection_duplication() -> anyhow::Result<()> {
// Forward
test((
"#[\n|]#",
"ilorem<ret>ipsum<ret>dolor<esc>ggvlCC",
"#(lo|)#rem\n#(ip|)#sum\n#[do|]#lor\n",
platform_line(indoc! {"\
#[lo|]#rem
ipsum
dolor
"})
.as_str(),
"CC",
platform_line(indoc! {"\
#(lo|)#rem
#(ip|)#sum
#[do|]#lor
"})
.as_str(),
))
.await?;

// Backward
test((
"#[\n|]#",
"ilorem<ret>ipsum<ret>dolor<esc>gglbCC",
"#(|lo)#rem\n#(|ip)#sum\n#[|do]#lor\n",
platform_line(indoc! {"\
#[|lo]#rem
ipsum
dolor
"})
.as_str(),
"CC",
platform_line(indoc! {"\
#(|lo)#rem
#(|ip)#sum
#[|do]#lor
"})
.as_str(),
))
.await?;
Ok(())
Expand Down

0 comments on commit 07db29a

Please sign in to comment.