diff options
author | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
commit | b8d4bb76703bcb15578e2b23c5d256532180b894 (patch) | |
tree | bedd1df7a00521a2bd986b3c0289d6556a59e39b /support/texlab/tests/test_completion_bibtex_type.rs | |
parent | 02e4625a78a5029e8b5dc2a4ec70193b232f497e (diff) |
CTAN sync 201912030301
Diffstat (limited to 'support/texlab/tests/test_completion_bibtex_type.rs')
-rw-r--r-- | support/texlab/tests/test_completion_bibtex_type.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/support/texlab/tests/test_completion_bibtex_type.rs b/support/texlab/tests/test_completion_bibtex_type.rs new file mode 100644 index 0000000000..5d56e3c178 --- /dev/null +++ b/support/texlab/tests/test_completion_bibtex_type.rs @@ -0,0 +1,26 @@ +pub mod support; + +use support::completion::*; + +const SCENARIO: &str = "bibtex/type"; + +#[tokio::test] +async fn empty_type() { + let item = run_item(SCENARIO, "foo.bib", 0, 1, "article").await; + assert!(item.documentation.is_some()); + verify::text_edit(&item, 0, 1, 0, 1, "article"); +} + +#[tokio::test] +async fn incomplete_type() { + let item = run_item(SCENARIO, "foo.bib", 1, 2, "article").await; + assert!(item.documentation.is_some()); + verify::text_edit(&item, 1, 1, 1, 4, "article"); +} + +#[tokio::test] +async fn complete_type() { + let item = run_item(SCENARIO, "foo.bib", 2, 8, "article").await; + assert!(item.documentation.is_some()); + verify::text_edit(&item, 2, 1, 2, 8, "article"); +} |