@@ -438,35 +438,20 @@ suite('KeybindingsMerge - No Conflicts', () => {
438438 assert . equal ( actual . mergeContent , expected ) ;
439439 } ) ;
440440
441- } ) ;
442-
443-
444- suite ( 'KeybindingsMerge - Conflicts' , ( ) => {
445-
446441 test ( 'merge when local and remote with one entry but different value' , async ( ) => {
447442 const localContent = stringify ( [ { key : 'alt+d' , command : 'a' , when : 'editorTextFocus && !editorReadonly' } ] ) ;
448443 const remoteContent = stringify ( [ { key : 'alt+c' , command : 'a' , when : 'editorTextFocus && !editorReadonly' } ] ) ;
449444 const actual = await mergeKeybindings ( localContent , remoteContent , null ) ;
450445 assert . ok ( actual . hasChanges ) ;
451446 assert . ok ( actual . hasConflicts ) ;
452447 assert . equal ( actual . mergeContent ,
453- `<<<<<<< local
454- [
448+ `[
455449 {
456450 "key": "alt+d",
457451 "command": "a",
458452 "when": "editorTextFocus && !editorReadonly"
459453 }
460- ]
461- =======
462- [
463- {
464- "key": "alt+c",
465- "command": "a",
466- "when": "editorTextFocus && !editorReadonly"
467- }
468- ]
469- >>>>>>> remote` ) ;
454+ ]` ) ;
470455 } ) ;
471456
472457 test ( 'merge when local and remote with different keybinding' , async ( ) => {
@@ -482,8 +467,7 @@ suite('KeybindingsMerge - Conflicts', () => {
482467 assert . ok ( actual . hasChanges ) ;
483468 assert . ok ( actual . hasConflicts ) ;
484469 assert . equal ( actual . mergeContent ,
485- `<<<<<<< local
486- [
470+ `[
487471 {
488472 "key": "alt+d",
489473 "command": "a",
@@ -494,21 +478,7 @@ suite('KeybindingsMerge - Conflicts', () => {
494478 "command": "-a",
495479 "when": "editorTextFocus && !editorReadonly"
496480 }
497- ]
498- =======
499- [
500- {
501- "key": "alt+c",
502- "command": "a",
503- "when": "editorTextFocus && !editorReadonly"
504- },
505- {
506- "key": "alt+a",
507- "command": "-a",
508- "when": "editorTextFocus && !editorReadonly"
509- }
510- ]
511- >>>>>>> remote` ) ;
481+ ]` ) ;
512482 } ) ;
513483
514484 test ( 'merge when the entry is removed in local but updated in remote' , async ( ) => {
@@ -519,17 +489,7 @@ suite('KeybindingsMerge - Conflicts', () => {
519489 assert . ok ( actual . hasChanges ) ;
520490 assert . ok ( actual . hasConflicts ) ;
521491 assert . equal ( actual . mergeContent ,
522- `<<<<<<< local
523- []
524- =======
525- [
526- {
527- "key": "alt+c",
528- "command": "a",
529- "when": "editorTextFocus && !editorReadonly"
530- }
531- ]
532- >>>>>>> remote` ) ;
492+ `[]` ) ;
533493 } ) ;
534494
535495 test ( 'merge when the entry is removed in local but updated in remote and a new entry is added in local' , async ( ) => {
@@ -540,22 +500,12 @@ suite('KeybindingsMerge - Conflicts', () => {
540500 assert . ok ( actual . hasChanges ) ;
541501 assert . ok ( actual . hasConflicts ) ;
542502 assert . equal ( actual . mergeContent ,
543- `<<<<<<< local
544- [
503+ `[
545504 {
546505 "key": "alt+b",
547506 "command": "b"
548507 }
549- ]
550- =======
551- [
552- {
553- "key": "alt+c",
554- "command": "a",
555- "when": "editorTextFocus && !editorReadonly"
556- }
557- ]
558- >>>>>>> remote` ) ;
508+ ]` ) ;
559509 } ) ;
560510
561511 test ( 'merge when the entry is removed in remote but updated in local' , async ( ) => {
@@ -566,17 +516,13 @@ suite('KeybindingsMerge - Conflicts', () => {
566516 assert . ok ( actual . hasChanges ) ;
567517 assert . ok ( actual . hasConflicts ) ;
568518 assert . equal ( actual . mergeContent ,
569- `<<<<<<< local
570- [
519+ `[
571520 {
572521 "key": "alt+c",
573522 "command": "a",
574523 "when": "editorTextFocus && !editorReadonly"
575524 }
576- ]
577- =======
578- []
579- >>>>>>> remote` ) ;
525+ ]` ) ;
580526 } ) ;
581527
582528 test ( 'merge when the entry is removed in remote but updated in local and a new entry is added in remote' , async ( ) => {
@@ -587,8 +533,7 @@ suite('KeybindingsMerge - Conflicts', () => {
587533 assert . ok ( actual . hasChanges ) ;
588534 assert . ok ( actual . hasConflicts ) ;
589535 assert . equal ( actual . mergeContent ,
590- `<<<<<<< local
591- [
536+ `[
592537 {
593538 "key": "alt+c",
594539 "command": "a",
@@ -598,15 +543,7 @@ suite('KeybindingsMerge - Conflicts', () => {
598543 "key": "alt+b",
599544 "command": "b"
600545 }
601- ]
602- =======
603- [
604- {
605- "key": "alt+b",
606- "command": "b"
607- }
608- ]
609- >>>>>>> remote` ) ;
546+ ]` ) ;
610547 } ) ;
611548
612549 test ( 'merge when local and remote has moved forwareded with conflicts' , async ( ) => {
@@ -639,8 +576,7 @@ suite('KeybindingsMerge - Conflicts', () => {
639576 assert . ok ( actual . hasChanges ) ;
640577 assert . ok ( actual . hasConflicts ) ;
641578 assert . equal ( actual . mergeContent ,
642- `<<<<<<< local
643- [
579+ `[
644580 {
645581 "key": "alt+d",
646582 "command": "-f"
@@ -671,42 +607,11 @@ suite('KeybindingsMerge - Conflicts', () => {
671607 "command": "g",
672608 "when": "context2"
673609 }
674- ]
675- =======
676- [
677- {
678- "key": "alt+a",
679- "command": "f"
680- },
681- {
682- "key": "cmd+c",
683- "command": "-c"
684- },
685- {
686- "key": "cmd+d",
687- "command": "d"
688- },
689- {
690- "key": "alt+d",
691- "command": "-f"
692- },
693- {
694- "key": "alt+c",
695- "command": "c",
696- "when": "context1"
697- },
698- {
699- "key": "alt+g",
700- "command": "g",
701- "when": "context2"
702- }
703- ]
704- >>>>>>> remote` ) ;
610+ ]` ) ;
705611 } ) ;
706612
707613} ) ;
708614
709-
710615async function mergeKeybindings ( localContent : string , remoteContent : string , baseContent : string | null ) {
711616 const userDataSyncUtilService = new MockUserDataSyncUtilService ( ) ;
712617 const formattingOptions = await userDataSyncUtilService . resolveFormattingOptions ( ) ;
0 commit comments