(t *testing.T)
| 78 | } |
| 79 | |
| 80 | func TestExtractForwardContext_QuotedPrintable(t *testing.T) { |
| 81 | raw := []byte("From: alice@example.com\r\n" + |
| 82 | "Subject: Hi\r\n" + |
| 83 | "Content-Type: text/plain; charset=utf-8\r\n" + |
| 84 | "Content-Transfer-Encoding: quoted-printable\r\n" + |
| 85 | "\r\n" + |
| 86 | "caf=C3=A9") |
| 87 | |
| 88 | ctx := ExtractForwardContext(raw) |
| 89 | if ctx.Text != "café" { |
| 90 | t.Errorf("Text = %q, want 'café'", ctx.Text) |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | func TestExtractForwardContext_MultipartMixedWrappingAlternative(t *testing.T) { |
| 95 | raw := []byte("From: alice@example.com\r\n" + |
nothing calls this directly
no test coverage detected