mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make mad testing completion expectation checks work for case-insensitive suggestions
This commit is contained in:
+4
-1
@@ -28,6 +28,7 @@ import com.intellij.openapi.editor.impl.EditorImpl;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -130,7 +131,9 @@ public class InvokeCompletion extends ActionOnFile {
|
||||
|
||||
List<LookupElement> items = lookup.getItems();
|
||||
if (expectedVariant != null) {
|
||||
LookupElement sameItem = ContainerUtil.find(items, e -> e.getAllLookupStrings().contains(expectedVariant));
|
||||
LookupElement sameItem = ContainerUtil.find(items, e ->
|
||||
e.getAllLookupStrings().stream().anyMatch(
|
||||
s -> Comparing.equal(s, expectedVariant, e.isCaseSensitive())));
|
||||
TestCase.assertNotNull("No variant '" + expectedVariant + "' among " + items + notFound, sameItem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user