diff --git a/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb b/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb index c2a9a25354450..80de2cb4785bd 100644 --- a/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb +++ b/src/EditorFeatures/Test2/IntelliSense/CSharpCompletionCommandHandlerTests.vb @@ -2865,6 +2865,185 @@ class C End Function + + + + Public Async Function TestMatchWithTurkishIWorkaround3(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("tarif") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("TARIFE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround4(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("if") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("if") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround5(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("if") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("if") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround6(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("tarif") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("TARİFE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround7(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("ifad") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("İFADE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround8(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("ifad") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("IFADE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround9(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("IF") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("if") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround10(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateCSharpTestState(completionImplementation, + , extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) + state.SendTypeChars("IF") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("if") + End Using + End Using + + End Function + + Public Async Function TargetTypePreselection1(completionImplementation As CompletionImplementation) As Task diff --git a/src/EditorFeatures/Test2/IntelliSense/VisualBasicCompletionCommandHandlerTests.vb b/src/EditorFeatures/Test2/IntelliSense/VisualBasicCompletionCommandHandlerTests.vb index 302a7c6843735..bc8ae71280d2d 100644 --- a/src/EditorFeatures/Test2/IntelliSense/VisualBasicCompletionCommandHandlerTests.vb +++ b/src/EditorFeatures/Test2/IntelliSense/VisualBasicCompletionCommandHandlerTests.vb @@ -2944,6 +2944,246 @@ End Class End Using End Function + + + + Public Async Function TestMatchWithTurkishIWorkaround1(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("is") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("IsInterned") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround2(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("ı") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem() + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround3(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("tarif") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("TARIFE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround4(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("if") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("If") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround5(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("if") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("If") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround6(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("tarif") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("TARİFE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround7(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("ifad") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("İFADE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround8(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("ifad") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("IFADE") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround9(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("IF") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("If") + End Using + End Using + + End Function + + + + + Public Async Function TestMatchWithTurkishIWorkaround10(completionImplementation As CompletionImplementation) As Task + Using New CultureContext(New Globalization.CultureInfo("tr-TR", useUserOverride:=False)) + Using state = TestStateFactory.CreateVisualBasicTestState(completionImplementation, + ) + state.SendTypeChars("IF") + Await state.WaitForAsynchronousOperationsAsync() + Await state.AssertSelectedCompletionItem("If") + End Using + End Using + + End Function + + Friend Class MockSnippetInfoService Implements ISnippetInfoService