(t *testing.T)
| 104 | if err := os.WriteFile(path, []byte("a\nb\n"), 0o644); err != nil { |
| 105 | t.Fatal(err) |
| 106 | } |
| 107 | got := ReadFile(path, 99, 0) |
| 108 | if !strings.Contains(got, "past the end") { |
| 109 | t.Fatalf("expected a past-the-end error, got %q", got) |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | // TestReadFileCoercesStringOffset: weak local tool-call parsers emit integers |
| 114 | // as strings. A string offset silently read as 0 would re-read the head |
| 115 | // forever, exactly the loop the continuation note invites. |
| 116 | func TestReadFileCoercesStringOffset(t *testing.T) { |
| 117 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected