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

27 lines
615 B
Rust
Raw Normal View History

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