(text: &str, names: &mut BTreeSet<String>)
| 421 | assert!(failures.is_empty(), "{}", failures.join("\n")); |
| 422 | } |
| 423 | |
| 424 | #[test] |
| 425 | fn book_and_docs_are_separate_collections() { |
| 426 | assert!(docs() |
| 427 | .iter() |
| 428 | .any(|doc| doc.collection == "book" && doc.slug == "index")); |
| 429 | assert!(docs() |
| 430 | .iter() |
| 431 | .any(|doc| doc.collection == "docs" && doc.slug == "index")); |
| 432 | assert!(docs().iter().all(|doc| { |
| 433 | if doc.collection == "book" { |
| 434 | doc.route_path == "/book" || doc.route_path.starts_with("/book/") |
| 435 | } else { |
| 436 | doc.route_path == "/docs" || doc.route_path.starts_with("/docs/") |
| 437 | } |
| 438 | })); |
| 439 | } |
| 440 | |
| 441 | #[test] |
| 442 | fn generated_headings_have_unique_html_ids() { |
| 443 | let mut failures = Vec::new(); |
no test coverage detected