TestBase64Decoded: a base64 text/plain part is decoded.
(t *testing.T)
| 110 | |
| 111 | // TestBase64Decoded: a base64 text/plain part is decoded. |
| 112 | func TestBase64Decoded(t *testing.T) { |
| 113 | // "Hello base64" base64 = SGVsbG8gYmFzZTY0 |
| 114 | raw := "From: a@x.com\r\nContent-Type: text/plain\r\nContent-Transfer-Encoding: base64\r\n\r\nSGVsbG8gYmFzZTY0\r\n" |
| 115 | got, _ := ParsedBody([]byte(raw), 0) |
| 116 | if got != "Hello base64" { |
| 117 | t.Fatalf("base64 decode: got %q", got) |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | func TestParseHTML(t *testing.T) { |
| 122 | t.Run("text/html part surfaces decoded HTML, text flattened", func(t *testing.T) { |
nothing calls this directly
no test coverage detected