mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
615 B
Rust
27 lines
615 B
Rust
3 years ago
|
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?
|
||
|
(
|
||
3 years ago
|
helpers::platform_line("void foo() {#[|}]#").as_ref(),
|
||
3 years ago
|
"i<ret><esc>",
|
||
3 years ago
|
helpers::platform_line(indoc! {"\
|
||
3 years ago
|
void foo() {
|
||
|
#[|\n]#\
|
||
|
}
|
||
3 years ago
|
"})
|
||
|
.as_ref(),
|
||
3 years ago
|
),
|
||
3 years ago
|
)
|
||
|
.await?;
|
||
3 years ago
|
|
||
|
Ok(())
|
||
|
}
|