diff options
author | Blaž Hrastnik | 2022-06-21 16:59:02 +0000 |
---|---|---|
committer | GitHub | 2022-06-21 16:59:02 +0000 |
commit | 19dccade7c44619bfa414a711fe72a612e4ca358 (patch) | |
tree | d0a502bc095c1619cfb94236782f42d595af0197 /helix-term/tests/test/auto_indent.rs | |
parent | a17626a822b36d4de3146c2d410f976e19dd189c (diff) | |
parent | 458b89e21dcf76bbf9ca6ba237bd334f4922722d (diff) |
Merge pull request #2359 from dead10ck/test-harness
Integration testing harness
Diffstat (limited to 'helix-term/tests/test/auto_indent.rs')
-rw-r--r-- | helix-term/tests/test/auto_indent.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/helix-term/tests/test/auto_indent.rs b/helix-term/tests/test/auto_indent.rs new file mode 100644 index 00000000..2f638893 --- /dev/null +++ b/helix-term/tests/test/auto_indent.rs @@ -0,0 +1,26 @@ +use super::*; + +#[tokio::test] +async fn auto_indent_c() -> anyhow::Result<()> { + test_with_config( + Args { + files: vec![(PathBuf::from("foo.c"), Position::default())], + ..Default::default() + }, + Config::default(), + // switches to append mode? + ( + helpers::platform_line("void foo() {#[|}]#").as_ref(), + "i<ret><esc>", + helpers::platform_line(indoc! {"\ + void foo() { + #[|\n]#\ + } + "}) + .as_ref(), + ), + ) + .await?; + + Ok(()) +} |