blob: 06f12349ac5ca1f56275933717af158d31da2fea (
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
|
pub mod support;
use lsp_types::*;
use support::hover::*;
use texlab::syntax::LANGUAGE_DATA;
const SCENARIO: &str = "bibtex/field";
#[tokio::test]
async fn known() {
let contents = run(SCENARIO, "foo.bib", 1, 4).await.unwrap();
assert_eq!(
contents,
HoverContents::Markup(MarkupContent {
kind: MarkupKind::Markdown,
value: LANGUAGE_DATA
.field_documentation("author")
.unwrap()
.to_owned()
})
);
}
#[tokio::test]
async fn unknown() {
let contents = run(SCENARIO, "foo.bib", 2, 5).await;
assert_eq!(contents, None);
}
|