summaryrefslogtreecommitdiff
path: root/support/texlab/tests/test_hover_bibtex_string_reference.rs
blob: d67f0289904cf16a7d45e87f22ea1d7de60340bd (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
pub mod support;

use lsp_types::*;
use support::hover::*;

const SCENARIO: &str = "bibtex/string_reference";

#[tokio::test]
async fn valid() {
    let contents = run(SCENARIO, "foo.bib", 3, 15).await.unwrap();
    assert_eq!(
        contents,
        HoverContents::Markup(MarkupContent {
            kind: MarkupKind::PlainText,
            value: "\"foo {bar} baz\"".into(),
        })
    );
}

#[tokio::test]
async fn invalid() {
    let contents = run(SCENARIO, "foo.bib", 3, 20).await;
    assert_eq!(contents, None);
}