summaryrefslogtreecommitdiff
path: root/support/texlab/tests/test_completion_latex_include.rs
blob: b657804317b96552b036e8475e1d32f0b63159d4 (plain)
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
29
pub mod support;

use support::completion::*;

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

#[tokio::test]
async fn include_root() {
    let (_, items) = run_list(SCENARIO, "foo.tex", 2, 9).await;
    verify::labels(&items, vec!["bar", "foo", "qux"]);
}

#[tokio::test]
async fn input_root() {
    let (_, items) = run_list(SCENARIO, "foo.tex", 3, 7).await;
    verify::labels(&items, vec!["bar.tex", "foo.tex", "qux"]);
}

#[tokio::test]
async fn input_subdirectory() {
    let (_, items) = run_list(SCENARIO, "foo.tex", 4, 11).await;
    verify::labels(&items, vec!["baz.tex"]);
}

#[tokio::test]
async fn bibliography() {
    let (_, items) = run_list(SCENARIO, "foo.tex", 5, 16).await;
    verify::labels(&items, vec!["bibliography.bib", "qux"]);
}