fix(doc): Add a test on README example (refs #333)

This commit is contained in:
Alexis Mousset
2019-04-14 18:03:50 +02:00
parent 2e7bd5708f
commit 10d362f509

View File

@@ -7,6 +7,14 @@ use std::process::Command;
#[test]
fn book_test() {
let mut book_path = env::current_dir().unwrap();
let readme = Path::new(file!())
.parent()
.unwrap()
.parent()
.unwrap()
.parent()
.unwrap()
.join("../README.md");
book_path.push(
Path::new(file!())
.parent()
@@ -21,6 +29,7 @@ fn book_test() {
for md in glob(&format!("{}/*.md", book_path.to_str().unwrap())).unwrap() {
skeptic_test(&md.unwrap());
}
skeptic_test(&readme);
}
fn skeptic_test(path: &Path) {