helix-mirror/helix-term/tests/test/auto_indent.rs

28 lines
668 B
Rust
Raw Normal View History

2022-04-17 08:19:22 +04:00
use super::*;
#[tokio::test(flavor = "multi_thread")]
2022-04-17 08:19:22 +04:00
async fn auto_indent_c() -> anyhow::Result<()> {
2022-05-22 21:29:52 +04:00
test_with_config(
2022-04-17 08:19:22 +04:00
Args {
files: vec![(PathBuf::from("foo.c"), Position::default())],
..Default::default()
},
Config::default(),
helpers::test_syntax_conf(None),
2022-04-17 08:19:22 +04:00
// switches to append mode?
(
2022-04-30 00:27:35 +04:00
helpers::platform_line("void foo() {#[|}]#").as_ref(),
2022-04-17 08:19:22 +04:00
"i<ret><esc>",
2022-04-30 00:27:35 +04:00
helpers::platform_line(indoc! {"\
2022-04-17 08:19:22 +04:00
void foo() {
#[|\n]#\
}
2022-04-30 00:27:35 +04:00
"})
.as_ref(),
2022-04-17 08:19:22 +04:00
),
)
.await?;
2022-04-17 08:19:22 +04:00
Ok(())
}