summaryrefslogtreecommitdiff
path: root/helix-term/tests/test/auto_indent.rs
blob: 5c093a5db45489384cd35acdbe34132c8dc2f353 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use super::*;

#[tokio::test]
async fn auto_indent_c() -> anyhow::Result<()> {
    test_with_config(
        Args {
            files: vec![(PathBuf::from("foo.c"), Position::default())],
            ..Default::default()
        },
        Config::default(),
        helpers::test_syntax_conf(None),
        // switches to append mode?
        (
            helpers::platform_line("void foo() {#[|}]#").as_ref(),
            "i<ret><esc>",
            helpers::platform_line(indoc! {"\
                void foo() {
                  #[|\n]#\
                }
            "})
            .as_ref(),
        ),
    )
    .await?;

    Ok(())
}