Index: src/org/eclipse/jdt/core/tests/model/CompletionTests.java =================================================================== RCS file: /data/cvs/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java,v retrieving revision 1.64 diff -u -r1.64 CompletionTests.java --- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 8 Jun 2004 10:58:29 -0000 1.64 +++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 16 Jun 2004 11:50:26 -0000 @@ -207,6 +207,7 @@ suite.addTest(new CompletionTests("testCompletionArrayAccess1")); suite.addTest(new CompletionTests("testCompletionFindSecondaryType1")); suite.addTest(new CompletionTests("testCompletion2InterfacesWithSameMethod")); + suite.addTest(new CompletionTests("testCompletionExactNameCaseInsensitive")); // completion keywords tests suite.addTest(new CompletionTests("testCompletionKeywordThis1")); @@ -615,7 +616,7 @@ ICompilationUnit cu = getCompilationUnit("Completion", "src", "", "CompletionCaseInsensitive.java"); String str = cu.getSource(); - String completeBehind = "Field"; + String completeBehind = "Fiel"; int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); cu.codeComplete(cursorLocation, requestor); @@ -8609,6 +8610,23 @@ assertEquals( "element:method completion:method() relevance:" + (R_DEFAULT + R_INTERESTING + R_CASE + R_NON_STATIC), + requestor.getResults()); +} +/* + * https://bugs.eclipse.org/bugs/show_bug.cgi?id=66570 + */ +public void testCompletionExactNameCaseInsensitive() throws JavaModelException { + CompletionTestsRequestor requestor = new CompletionTestsRequestor(); + ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionExactNameCaseInsensitive.java"); + + String str = cu.getSource(); + String completeBehind = "(compleTionexactnamecaseInsensitive"; + int cursorLocation = str.indexOf(completeBehind) + completeBehind.length(); + cu.codeComplete(cursorLocation, requestor); + + assertEquals( + "element:CompletionExactNameCaseInsensitive completion:CompletionExactNameCaseInsensitive relevance:"+(R_DEFAULT + R_INTERESTING + R_EXACT_NAME + R_UNQUALIFIED)+ "\n" + + "element:CompletionExactNameCaseInsensitivePlus completion:CompletionExactNameCaseInsensitivePlus relevance:"+(R_DEFAULT + R_INTERESTING + R_UNQUALIFIED), requestor.getResults()); } } Index: workspace/Completion/src/CompletionExactNameCaseInsensitive.java =================================================================== RCS file: workspace/Completion/src/CompletionExactNameCaseInsensitive.java diff -N workspace/Completion/src/CompletionExactNameCaseInsensitive.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ workspace/Completion/src/CompletionExactNameCaseInsensitive.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,6 @@ +public class CompletionExactNameCaseInsensitive { + void foo(compleTionexactnamecaseInsensitive c){} +} +class CompletionExactNameCaseInsensitivePlus { + +}