2022-04-17 12:19:22 +08:00
|
|
|
use super::*;
|
|
|
|
|
2022-10-21 12:28:29 +08:00
|
|
|
#[tokio::test(flavor = "multi_thread")]
|
2022-04-17 12:19:22 +08:00
|
|
|
async fn auto_indent_c() -> anyhow::Result<()> {
|
2022-05-23 01:29:52 +08:00
|
|
|
test_with_config(
|
2022-11-11 12:58:03 +08:00
|
|
|
AppBuilder::new().with_file("foo.c", None),
|
2022-04-17 12:19:22 +08:00
|
|
|
// switches to append mode?
|
|
|
|
(
|
2024-03-31 20:12:17 +08:00
|
|
|
"void foo() {#[|}]#",
|
2022-04-17 12:19:22 +08:00
|
|
|
"i<ret><esc>",
|
2024-03-31 20:12:17 +08:00
|
|
|
indoc! {"\
|
2022-04-17 12:19:22 +08:00
|
|
|
void foo() {
|
|
|
|
#[|\n]#\
|
|
|
|
}
|
2024-03-31 20:12:17 +08:00
|
|
|
"},
|
2022-04-17 12:19:22 +08:00
|
|
|
),
|
2022-04-19 13:21:31 +08:00
|
|
|
)
|
|
|
|
.await?;
|
2022-04-17 12:19:22 +08:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|