@@ -73,7 +73,7 @@ describe('provideDocumentRangeFormattingEdits', () => {
7373 createTextEdit ( 2 , 2 , 'X' ) ,
7474 ] ;
7575 const result = restrictFormattingEditsToRange ( document , selection , edits , createTextEdit ) ;
76- expect ( applyEdits ( document , result ) ) . toMatchInlineSnapshot ( `"01X23456789 "` ) ;
76+ expect ( applyEdits ( document , result ) ) . toMatchInlineSnapshot ( `"01X234Z6789 "` ) ;
7777 } ) ;
7878
7979 test ( 'handles deletion where newText is shorter than oldText in selection' , ( ) => {
@@ -129,7 +129,7 @@ describe('provideDocumentRangeFormattingEdits', () => {
129129 const selection = createRange ( 5 , 5 ) ; // empty selection at position 5
130130 const edits = [ createTextEdit ( 3 , 7 , 'ABCD' ) ] ;
131131 const result = restrictFormattingEditsToRange ( document , selection , edits , createTextEdit ) ;
132- expect ( applyEdits ( document , result ) ) . toMatchInlineSnapshot ( `"0123456789 "` ) ;
132+ expect ( applyEdits ( document , result ) ) . toMatchInlineSnapshot ( `"012ABCD789 "` ) ;
133133 } ) ;
134134
135135 test ( 'handles empty edit (pure insertion)' , ( ) => {
@@ -166,15 +166,6 @@ describe('provideDocumentRangeFormattingEdits', () => {
166166 const result = restrictFormattingEditsToRange ( document , selection , edits , createTextEdit ) ;
167167 expect ( applyEdits ( document , result ) ) . toMatchInlineSnapshot ( `"你好朋友"` ) ;
168168 } ) ;
169-
170- test ( 'handles overlapStart equals overlapEnd' , ( ) => {
171- // When edit and selection don't actually overlap in content
172- const document = createDocument ( '0123456789' ) ;
173- const selection = createRange ( 5 , 5 ) ;
174- const edits = [ createTextEdit ( 3 , 7 , 'WXYZ' ) ] ;
175- const result = restrictFormattingEditsToRange ( document , selection , edits , createTextEdit ) ;
176- expect ( applyEdits ( document , result ) ) . toMatchInlineSnapshot ( `"0123456789"` ) ;
177- } ) ;
178169} ) ;
179170
180171// self implementation of vscode test utils
0 commit comments