MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestBuildReferencesChain_MultilineFolded

Function TestBuildReferencesChain_MultilineFolded

internal/outbound/reply_test.go:217–227  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

215}
216
217func TestBuildReferencesChain_MultilineFolded(t *testing.T) {
218 // References headers commonly span multiple lines via RFC 5322 folding
219 // (CRLF + WSP). net/mail unfolds these; we just need the IDs back.
220 raw := []byte("References: <u1@host>\r\n <a1@host>\r\n <a2@host>\r\nSubject: Hi\r\n\r\nbody")
221
222 got := BuildReferencesChain(raw, "<parent@host>")
223 want := []string{"<u1@host>", "<a1@host>", "<a2@host>", "<parent@host>"}
224 if !reflect.DeepEqual(got, want) {
225 t.Errorf("got %v, want %v", got, want)
226 }
227}
228
229// MultiPartyThreadFork is the regression case for the bug this PR fixes.
230//

Callers

nothing calls this directly

Calls 1

BuildReferencesChainFunction · 0.85

Tested by

no test coverage detected