(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestProcessAttachment_TextFile_InlineText(t *testing.T) { |
| 177 | t.Parallel() |
| 178 | content := "Hello, this is a text file.\nLine 2." |
| 179 | path := writeTempFile(t, ".txt", []byte(content)) |
| 180 | |
| 181 | doc, err := chat.ProcessAttachment(t.Context(), chat.MessagePart{ |
| 182 | Type: chat.MessagePartTypeFile, |
| 183 | File: &chat.MessageFile{Path: path, MimeType: "text/plain"}, |
| 184 | }) |
| 185 | require.NoError(t, err) |
| 186 | assert.Empty(t, doc.Source.InlineData) |
| 187 | assert.Contains(t, doc.Source.InlineText, content) |
| 188 | } |
| 189 | |
| 190 | func TestProcessAttachment_MarkdownFile_InlineText(t *testing.T) { |
| 191 | t.Parallel() |
nothing calls this directly
no test coverage detected