(t *testing.T)
| 1015 | } |
| 1016 | } |
| 1017 | |
| 1018 | func TestSubmitStreamsUpToDone(t *testing.T) { |
| 1019 | m := newTestModel(t, func(w http.ResponseWriter, _ *http.Request) { |
| 1020 | w.Header().Set("Content-Type", "text/event-stream") |
| 1021 | fmt.Fprintf(w, "data: %s\n\n", `{"choices":[{"delta":{"content":"pong"}}]}`) |
| 1022 | fmt.Fprint(w, "data: [DONE]\n\n") |
| 1023 | }) |
| 1024 | mm, cmd := m.submit("ping", "ping", promptEntry{display: "ping"}) |
| 1025 | out, _ := drain(mm, cmd) |
| 1026 | if got := out.(Model).scroll.String(); !strings.Contains(got, "pong") { |
| 1027 | t.Fatalf("assistant output missing: %q", got) |
| 1028 | } |
| 1029 | } |
| 1030 | |
| 1031 | func TestToolCallRoundTripExecutesBash(t *testing.T) { |
nothing calls this directly
no test coverage detected