summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-10-01 19:33:51 -0700
committerGeorge Fraser <george@fivetran.com>2018-10-01 19:36:40 -0700
commitafd13d3988a8581f91666374e8684751caf9da97 (patch)
tree69b34eff8f59c335279b7c557b2e2fc799a4402e /src/test
parent6fbc9923a9570482d3fe1fc806788c8036b05f76 (diff)
downloadjava-language-server-afd13d3988a8581f91666374e8684751caf9da97.zip
Fix import static completions
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/CompletionsTest.java8
-rw-r--r--src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java
index 12e7010..585efdf 100644
--- a/src/test/java/org/javacs/CompletionsTest.java
+++ b/src/test/java/org/javacs/CompletionsTest.java
@@ -792,4 +792,12 @@ public class CompletionsTest extends CompletionsBase {
assertThat(suggestions, hasItem(containsString("implements")));
}
+
+ @Test
+ public void importStaticPackage() {
+ var file = "/org/javacs/example/AutocompleteImportStatic.java";
+ var suggestions = insertText(file, 3, 20);
+
+ assertThat(suggestions, hasItem(containsString("util")));
+ }
}
diff --git a/src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java b/src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java
new file mode 100644
index 0000000..4fa93ec
--- /dev/null
+++ b/src/test/test-project/workspace/src/org/javacs/example/AutocompleteImportStatic.java
@@ -0,0 +1,3 @@
+package org.javacs.example;
+
+import static java. \ No newline at end of file