summaryrefslogtreecommitdiff
path: root/src/test/java/org/javacs/CompletionsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/javacs/CompletionsTest.java')
-rw-r--r--src/test/java/org/javacs/CompletionsTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java
index 3f70c0b..0d5757e 100644
--- a/src/test/java/org/javacs/CompletionsTest.java
+++ b/src/test/java/org/javacs/CompletionsTest.java
@@ -759,6 +759,14 @@ public class CompletionsTest extends CompletionsBase {
var file = "/org/javacs/example/AutocompletePackageName.java";
var suggestions = insertText(file, 1, 5);
- assertThat(suggestions, contains("package org.javacs.example;\n\n"));
+ assertThat(suggestions, hasItem(startsWith("package org.javacs.example;")));
+ }
+
+ @Test
+ public void className() throws IOException {
+ var file = "/org/javacs/example/AutocompleteClassName.java";
+ var suggestions = insertText(file, 1, 2);
+
+ assertThat(suggestions, hasItem(startsWith("class AutocompleteClassName")));
}
}