()
| 493 | |
| 494 | #[test] |
| 495 | fn test_collect_styles() { |
| 496 | let doc = Document::parse_with_options( |
| 497 | r" |
| 498 | <head> |
| 499 | <style>h1 { color:blue; }</style> |
| 500 | <style>h1 { color:red }</style> |
| 501 | <style data-css-inline='ignore'>h1 { color:yellow; }</style> |
| 502 | </head>" |
| 503 | .as_bytes(), |
| 504 | 0, |
| 505 | InliningMode::Document, |
| 506 | ); |
| 507 | let styles = doc.styles().map(|(_, content)| content).collect::<Vec<_>>(); |
| 508 | assert_eq!(styles.len(), 2); |
| 509 | assert_eq!(styles[0], "h1 { color:blue; }"); |
| 510 | assert_eq!(styles[1], "h1 { color:red }"); |
| 511 | } |
| 512 | |
| 513 | #[test] |
| 514 | fn test_collect_stylesheets() { |
nothing calls this directly
no test coverage detected