MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestEmptyPatch

Function TestEmptyPatch

internal/diff/diff_test.go:45–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestEmptyPatch(t *testing.T) {
46 content := "Hello world"
47 result, err := ApplyPatch(content, "")
48 if err != nil {
49 t.Fatalf("unexpected error: %v", err)
50 }
51 if result != content {
52 t.Errorf("expected %q, got %q", content, result)
53 }
54}
55
56func TestIdenticalContent(t *testing.T) {
57 content := "Hello world"

Callers

nothing calls this directly

Calls 1

ApplyPatchFunction · 0.85

Tested by

no test coverage detected