2022-04-17 06:19:22 +02:00
|
|
|
use super::*;
|
|
|
|
|
2022-10-21 06:28:29 +02:00
|
|
|
#[tokio::test(flavor = "multi_thread")]
|
2022-04-17 06:19:22 +02:00
|
|
|
async fn auto_indent_c() -> anyhow::Result<()> {
|
2022-05-22 19:29:52 +02:00
|
|
|
test_with_config(
|
2022-04-17 06:19:22 +02:00
|
|
|
Args {
|
|
|
|
files: vec![(PathBuf::from("foo.c"), Position::default())],
|
|
|
|
..Default::default()
|
|
|
|
},
|
2022-10-23 02:51:55 +02:00
|
|
|
helpers::test_config(),
|
2022-09-17 05:17:48 +02:00
|
|
|
helpers::test_syntax_conf(None),
|
2022-04-17 06:19:22 +02:00
|
|
|
// switches to append mode?
|
|
|
|
(
|
2022-10-23 04:18:32 +02:00
|
|
|
helpers::platform_line("void foo() {#[|}]#"),
|
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-10-23 04:18:32 +02:00
|
|
|
"}),
|
2022-04-17 06:19:22 +02:00
|
|
|
),
|
2022-04-19 07:21:31 +02:00
|
|
|
)
|
|
|
|
.await?;
|
2022-04-17 06:19:22 +02:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|