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

Function TestBase64Decoded

internal/mailparse/parse_test.go:112–119  ·  view source on GitHub ↗

TestBase64Decoded: a base64 text/plain part is decoded.

(t *testing.T)

Source from the content-addressed store, hash-verified

110
111// TestBase64Decoded: a base64 text/plain part is decoded.
112func 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
121func TestParseHTML(t *testing.T) {
122 t.Run("text/html part surfaces decoded HTML, text flattened", func(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ParsedBodyFunction · 0.85

Tested by

no test coverage detected