()
| 1095 | |
| 1096 | #[test] |
| 1097 | fn test_parse_headers() { |
| 1098 | let literal = b"From: Alice <alice@example.com>\r\nSubject: Hello\r\nDate: Wed, 1 Jan 2025 00:00:00 +0000\r\n\r\n"; |
| 1099 | let headers = super::parse_headers(literal); |
| 1100 | |
| 1101 | assert_eq!( |
| 1102 | headers.get("from"), |
| 1103 | Some(&"Alice <alice@example.com>".to_string()) |
| 1104 | ); |
| 1105 | assert_eq!(headers.get("subject"), Some(&"Hello".to_string())); |
| 1106 | assert_eq!( |
| 1107 | headers.get("date"), |
| 1108 | Some(&"Wed, 1 Jan 2025 00:00:00 +0000".to_string()) |
| 1109 | ); |
| 1110 | } |
| 1111 | |
| 1112 | #[test] |
| 1113 | fn test_extract_text_and_html_bodies_multipart() { |
nothing calls this directly
no test coverage detected