File tree Expand file tree Collapse file tree
tests/cases/unittests/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -317,7 +317,9 @@ describe('Colorization', function () {
317317 operator ( "<" ) ,
318318 identifier ( "number" ) ,
319319 finalEndOfLineState ( ts . EndOfLineState . Start ) ) ;
320+ } ) ;
320321
322+ it ( "ClassifiesConflictTokens" , ( ) => {
321323 // no longer in something that looks generic.
322324 test ( "Foo<Foo> number" ,
323325 ts . EndOfLineState . Start ,
@@ -327,6 +329,33 @@ describe('Colorization', function () {
327329 operator ( ">" ) ,
328330 keyword ( "number" ) ,
329331 finalEndOfLineState ( ts . EndOfLineState . Start ) ) ;
332+
333+ // Test conflict markers.
334+ test (
335+ "class C {\r\n\
336+ <<<<<<< HEAD\r\n\
337+ v = 1;\r\n\
338+ =======\r\n\
339+ v = 2;\r\n\
340+ >>>>>>> Branch - a\r\n\
341+ }" ,
342+ ts . EndOfLineState . Start ,
343+ keyword ( "class" ) ,
344+ identifier ( "C" ) ,
345+ punctuation ( "{" ) ,
346+ comment ( "<<<<<<< HEAD" ) ,
347+ identifier ( "v" ) ,
348+ operator ( "=" ) ,
349+ numberLiteral ( "1" ) ,
350+ punctuation ( ";" ) ,
351+ comment ( "=======" ) ,
352+ identifier ( "v" ) ,
353+ operator ( "=" ) ,
354+ numberLiteral ( "2" ) ,
355+ punctuation ( ";" ) ,
356+ comment ( ">>>>>>> Branch - a" ) ,
357+ punctuation ( "}" ) ,
358+ finalEndOfLineState ( ts . EndOfLineState . Start ) ) ;
330359 } ) ;
331360 } ) ;
332361} ) ;
You can’t perform that action at this time.
0 commit comments