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

Function TestInlineStatusReadFile

internal/tools/read_test.go:106–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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.
116func TestReadFileCoercesStringOffset(t *testing.T) {
117 dir := t.TempDir()

Callers

nothing calls this directly

Calls 1

InlineStatusFunction · 0.85

Tested by

no test coverage detected