mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 06:43:23 +08:00
feat: metadata 上报
This commit is contained in:
25
backend/pkg/diff/diff_test.go
Normal file
25
backend/pkg/diff/diff_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user