MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestEditFileNoOp

Function TestEditFileNoOp

internal/tools/edit_test.go:116–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

114}
115
116func TestEditFileNoOp(t *testing.T) {
117 dir := t.TempDir()
118 path := filepath.Join(dir, "f.txt")
119 if err := os.WriteFile(path, []byte("abc"), 0o644); err != nil {
120 t.Fatal(err)
121 }
122 s := EditFile(path, "x", "x")
123 if !strings.Contains(s, "no change") {
124 t.Fatalf("bad: %q", s)
125 }
126}
127
128func TestEditFileEmptyOldString(t *testing.T) {
129 dir := t.TempDir()

Callers

nothing calls this directly

Calls 1

EditFileFunction · 0.85

Tested by

no test coverage detected