aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/integration/auto_pairs.rs
blob: d34cd0fd968fa960cc3878edd57a100d3ccaa315 (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
28
use super::*;

#[tokio::test]
async fn auto_pairs_basic() -> anyhow::Result<()> {
    test_key_sequence_text_result(
        Args::default(),
        Config::default(),
        ("#[\n|]#", "i(<esc>", "(#[|)]#\n"),
        None,
    )
    .await?;

    test_key_sequence_text_result(
        Args::default(),
        Config {
            editor: helix_view::editor::Config {
                auto_pairs: AutoPairConfig::Enable(false),
                ..Default::default()
            },
            ..Default::default()
        },
        ("#[\n|]#", "i(<esc>", "(#[|\n]#"),
        None,
    )
    .await?;

    Ok(())
}