Files

26 lines
353 B
Go
Raw Permalink Normal View History

2025-07-18 17:12:52 +08:00
package diff
import (
"fmt"
"testing"
)
func TestParseConflictsAndCountLines(t *testing.T) {
conflictText := `<<<<<<< HEAD
old line 1
=======
new line 1
new line 2
>>>>>>> branch1
normal line
<<<<<<< HEAD
old line 2
old line 3
=======
new line 3
>>>>>>> branch2`
addedLines := ParseConflictsAndCountLines(conflictText)
fmt.Println(addedLines)
}