(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func 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 | |
| 128 | func TestEditFileEmptyOldString(t *testing.T) { |
| 129 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected