//! Tests for the index preprocessor. use crate::prelude::*; // Checks basic README to index.html conversion. #[test] fn readme_to_index() { let mut test = BookTest::from_dir("index/basic_readme"); test.check_main_file( "book/index.html", str![[r##"

Intro

"##]], ) .check_main_file( "book/first/index.html", str![[r##"

First

"##]], ) .check_main_file( "book/second/index.html", str![[r##"

Second

"##]], ) .check_toc_js(str![[r#"
  1. Intro
  2. First
  3. Second
"#]]); assert!(test.dir.join("book/index.html").exists()); assert!(!test.dir.join("book/README.html").exists()); }