(rest: &str, names: &mut BTreeSet<String>)
| 440 | |
| 441 | #[test] |
| 442 | fn generated_headings_have_unique_html_ids() { |
| 443 | let mut failures = Vec::new(); |
| 444 | for doc in docs() { |
| 445 | let mut seen = BTreeSet::new(); |
| 446 | for heading in &doc.headings { |
| 447 | if !seen.insert(heading.id.as_str()) { |
| 448 | failures.push(format!("{} repeats heading id `{}`", doc.slug, heading.id)); |
| 449 | } |
| 450 | let marker = format!("id=\"{}\"", heading.id); |
| 451 | if !doc.html.contains(&marker) { |
| 452 | failures.push(format!( |
| 453 | "{} renders no id for heading `{}`", |
no test coverage detected