summaryrefslogtreecommitdiff
path: root/support/texlab/tests/test_completion_latex_user.rs
blob: d17a5c3f6a86e68204538cbb4102d71472531048 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub mod support;

use support::completion::*;

const SCENARIO: &str = "latex/user";

#[tokio::test]
async fn command() {
    let item = run_item(SCENARIO, "foo.tex", 1, 3, "foo").await;
    verify::text_edit(&item, 1, 1, 1, 3, "foo");
    verify::detail(&item, "user-defined");
}

#[tokio::test]
async fn environment() {
    let item = run_item(SCENARIO, "foo.tex", 4, 7, "foo").await;
    verify::text_edit(&item, 4, 7, 4, 9, "foo");
    verify::detail(&item, "user-defined");
}