diff options
Diffstat (limited to 'subplotlib/build.rs')
-rw-r--r-- | subplotlib/build.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/subplotlib/build.rs b/subplotlib/build.rs index f22a50c..e5f8917 100644 --- a/subplotlib/build.rs +++ b/subplotlib/build.rs @@ -2,8 +2,8 @@ // // We use the `subplot_build` crate to generate a Rust test code file // with functions for the scenarios for each subplot file -// (subplot/*.md in the source tree). The generated file is written to -// the Cargo target directory. For each subplot foo.md there should be +// (subplot/*.subplot in the source tree). The generated file is written to +// the Cargo target directory. For each subplot foo.subplot there should be // a tests/foo.rs in the source tree, which includes the generated // file from the Cargo target tree. The source file should look like this: // @@ -15,11 +15,11 @@ use glob::glob; use std::{fs, path::Path}; fn gen_tests() { - let subplots = glob("*.md").expect("failed to find subplots in subplotlib"); + let subplots = glob("*.subplot").expect("failed to find subplots in subplotlib"); let tests = Path::new("tests"); - let subplots = subplots.chain(Some(Ok("../subplot.md".into()))); + let subplots = subplots.chain(Some(Ok("../subplot.subplot".into()))); let subplots = subplots - .chain(glob("../tests/subplots/common/*.md").expect("failed to find common subplots")); + .chain(glob("../tests/subplots/common/*.subplot").expect("failed to find common subplots")); for entry in subplots { let entry = entry.expect("failed to get subplot dir entry in subplotlib"); let mut inc = tests.join(&entry.file_name().unwrap()); @@ -35,8 +35,8 @@ fn gen_tests() { fn main() { // Because we cannot generate tests if we're not fully inside the main subplot tree - // we only generate them if we can see ../subplot.md which is a good indicator. - if fs::metadata("../subplot.md").is_ok() { + // we only generate them if we can see ../subplot.subplot which is a good indicator. + if fs::metadata("../subplot.subplot").is_ok() { gen_tests(); } } |