File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -405,6 +405,23 @@ fn merge_conflict_lt() {
405405 ) ;
406406}
407407
408+ #[ test]
409+ fn merge_conflict_lt_with_head ( ) {
410+ assert_error ! (
411+ "let wobble: Int = 32
412+ <<<<<<< HEAD" ,
413+ ParseError {
414+ error: ParseErrorType :: LexError {
415+ error: LexicalError {
416+ error: LexicalErrorType :: MergeConflictIndicator ,
417+ location: SrcSpan { start: 29 , end: 36 } ,
418+ }
419+ } ,
420+ location: SrcSpan { start: 29 , end: 36 } ,
421+ }
422+ ) ;
423+ }
424+
408425#[ test]
409426fn four_lt_not_merge_conflict ( ) {
410427 assert_error ! (
@@ -462,6 +479,23 @@ fn merge_conflict_gt() {
462479 ) ;
463480}
464481
482+ #[ test]
483+ fn merge_conflict_gt_with_branch_name ( ) {
484+ assert_error ! (
485+ "let wobble: Int = 32
486+ >>>>>>> main" ,
487+ ParseError {
488+ error: ParseErrorType :: LexError {
489+ error: LexicalError {
490+ error: LexicalErrorType :: MergeConflictIndicator ,
491+ location: SrcSpan { start: 29 , end: 36 } ,
492+ }
493+ } ,
494+ location: SrcSpan { start: 29 , end: 36 } ,
495+ }
496+ ) ;
497+ }
498+
465499#[ test]
466500fn four_gt_not_merge_conflict ( ) {
467501 assert_error ! (
You can’t perform that action at this time.
0 commit comments