(t *testing.T)
| 220 | } |
| 221 | |
| 222 | func TestExtractThreadInfoMissingHeaders(t *testing.T) { |
| 223 | raw := []byte("From: alice@example.com\r\n\r\nBody only\r\n") |
| 224 | |
| 225 | info := extractThreadInfo(raw) |
| 226 | |
| 227 | if info.MessageID != "" { |
| 228 | t.Errorf("MessageID should be empty, got %q", info.MessageID) |
| 229 | } |
| 230 | if info.Subject != "" { |
| 231 | t.Errorf("Subject should be empty, got %q", info.Subject) |
| 232 | } |
| 233 | if info.InReplyTo != "" { |
| 234 | t.Errorf("InReplyTo should be empty, got %q", info.InReplyTo) |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | func TestExtractThreadInfoMalformed(t *testing.T) { |
| 239 | info := extractThreadInfo([]byte("not a valid email")) |
nothing calls this directly
no test coverage detected