fix(doc): Add a test on README example (refs #333)
This commit is contained in:
@@ -7,6 +7,14 @@ use std::process::Command;
|
|||||||
#[test]
|
#[test]
|
||||||
fn book_test() {
|
fn book_test() {
|
||||||
let mut book_path = env::current_dir().unwrap();
|
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(
|
book_path.push(
|
||||||
Path::new(file!())
|
Path::new(file!())
|
||||||
.parent()
|
.parent()
|
||||||
@@ -21,6 +29,7 @@ fn book_test() {
|
|||||||
for md in glob(&format!("{}/*.md", book_path.to_str().unwrap())).unwrap() {
|
for md in glob(&format!("{}/*.md", book_path.to_str().unwrap())).unwrap() {
|
||||||
skeptic_test(&md.unwrap());
|
skeptic_test(&md.unwrap());
|
||||||
}
|
}
|
||||||
|
skeptic_test(&readme);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn skeptic_test(path: &Path) {
|
fn skeptic_test(path: &Path) {
|
||||||
|
|||||||
Reference in New Issue
Block a user