MCPcopy Create free account
hub / github.com/chatmail/core / test_dehtml_parse_br

Function test_dehtml_parse_br

src/dehtml.rs:439–455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

437
438 #[test]
439 fn test_dehtml_parse_br() {
440 let html = "line1<br>line2";
441 let plain = dehtml(html).unwrap().text;
442 assert_eq!(plain, "line1\nline2");
443
444 let html = "line1<br> line2";
445 let plain = dehtml(html).unwrap().text;
446 assert_eq!(plain, "line1\nline2");
447
448 let html = "line1 <br><br> line2";
449 let plain = dehtml(html).unwrap().text;
450 assert_eq!(plain, "line1\n\nline2");
451
452 let html = "\r\r\nline1<br>\r\n\r\n\r\rline2<br/>line3\n\r";
453 let plain = dehtml(html).unwrap().text;
454 assert_eq!(plain, "line1\nline2\nline3");
455 }
456
457 #[test]
458 fn test_dehtml_parse_span() {

Callers

nothing calls this directly

Calls 1

dehtmlFunction · 0.85

Tested by

no test coverage detected