summaryrefslogtreecommitdiff
path: root/support/texlab/tests/test_completion_latex_include.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/tests/test_completion_latex_include.rs')
-rw-r--r--support/texlab/tests/test_completion_latex_include.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/support/texlab/tests/test_completion_latex_include.rs b/support/texlab/tests/test_completion_latex_include.rs
new file mode 100644
index 0000000000..b657804317
--- /dev/null
+++ b/support/texlab/tests/test_completion_latex_include.rs
@@ -0,0 +1,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"]);
+}