MCPcopy Create free account
hub / github.com/sergi/go-diff / TestPatchMakeOutOfRangePanic

Function TestPatchMakeOutOfRangePanic

diffmatchpatch/patch_test.go:341–364  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

339}
340
341func TestPatchMakeOutOfRangePanic(t *testing.T) {
342 text1 := `
343 1111111111111 000000
344 ------------- ------
345 xxxxxxxxxxxxx ------
346 xxxxxxxxxxxxx ------
347 xxxxxxxxxxxxx xxxxxx
348 xxxxxxxxxxxxx ......
349 xxxxxxxxxxxxx 111111
350 xxxxxxxxxxxxx ??????
351 xxxxxxxxxxxxx 333333
352 xxxxxxxxxxxxx 555555
353 xxxxxxxxxx xxxxx
354 xxxxxxxxxx xxxxx
355 xxxxxxxxxx xxxxx
356 xxxxxxxxxx xxxxx
357`
358 text2 := `
359 2222222222222 000000
360 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
361 dmp := New()
362 patches := dmp.PatchMake(text1, text2)
363 assert.Equal(t, 6, len(patches), "TestPatchMakeOutOfRangePanic")
364}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
PatchMakeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…