File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,30 @@ public void Should_Return_Did_Open_Text_Document_Handler_Descriptor()
75
75
result . Should ( ) . Contain ( x => x . Method == DocumentNames . DidOpen ) ;
76
76
}
77
77
78
+ [ Fact ]
79
+ public void Should_Return_Did_Open_Text_Document_Handler_Descriptor_With_Sepcial_Character ( )
80
+ {
81
+ // Given
82
+ var textDocumentSyncHandler =
83
+ TextDocumentSyncHandlerExtensions . With ( DocumentSelector . ForPattern ( "**/*.cshtml" ) ) ;
84
+ var collection = new HandlerCollection ( SupportedCapabilitiesFixture . AlwaysTrue ) { textDocumentSyncHandler } ;
85
+ AutoSubstitute . Provide < IHandlerCollection > ( collection ) ;
86
+ AutoSubstitute . Provide < IEnumerable < ILspHandlerDescriptor > > ( collection ) ;
87
+ var handlerMatcher = AutoSubstitute . Resolve < TextDocumentMatcher > ( ) ;
88
+
89
+ // When
90
+ var result = handlerMatcher . FindHandler ( new DidOpenTextDocumentParams ( ) {
91
+ TextDocument = new TextDocumentItem {
92
+ Uri = new Uri ( "file://c:/users/myøasdf/d.cshtml" )
93
+ }
94
+ } ,
95
+ collection . Where ( x => x . Method == DocumentNames . DidOpen ) ) ;
96
+
97
+ // Then
98
+ result . Should ( ) . NotBeNullOrEmpty ( ) ;
99
+ result . Should ( ) . Contain ( x => x . Method == DocumentNames . DidOpen ) ;
100
+ }
101
+
78
102
[ Fact ]
79
103
public void Should_Return_Did_Change_Text_Document_Descriptor ( )
80
104
{
You can’t perform that action at this time.
0 commit comments