MCPcopy Create free account
hub / github.com/alibaba/open-code-review / TestMatchConsecutive_MultiLine

Function TestMatchConsecutive_MultiLine

internal/diff/resolver_test.go:481–487  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

479}
480
481func TestMatchConsecutive_MultiLine(t *testing.T) {
482 lines := []indexedLine{{1, "a"}, {2, "b"}, {3, "c"}, {4, "d"}}
483 start, end, ok := matchConsecutive(lines, []string{"b", "c"})
484 if !ok || start != 2 || end != 3 {
485 t.Errorf("multi-line: got (%d, %d, %v), want (2, 3, true)", start, end, ok)
486 }
487}
488
489func TestMatchConsecutive_NoMatch(t *testing.T) {
490 lines := []indexedLine{{1, "a"}, {2, "b"}}

Callers

nothing calls this directly

Calls 1

matchConsecutiveFunction · 0.85

Tested by

no test coverage detected