"pandoc",
"pest",
"pest_derive",
- "rayon",
"thiserror",
]
--- /dev/null
+&{test.good}
use crate::{MetaError, Options};
use eyre::Result;
-use rayon::prelude::*;
use std::{fs, path::PathBuf};
use super::*;
Ok(name.to_string())
} else if let Some(name) = self.patterns.get(&Scope::into_global(key)) {
Ok(name.to_string())
+ } else if self
+ .opts
+ .pattern
+ .join(key.replace(".", "/") + ".meta")
+ .exists()
+ {
+ Ok(String::new())
} else if self.header.panic_default {
Err(MetaError::UndefinedDefault {
pattern: key.to_string(),
unit_test!(header_blank, "header/blank", "");
+unit_test!(
+ pat_file,
+ "expand/file.meta",
+ "<html>\n<p>GOOD</p>\n</html>\n"
+);
+
#[test]
fn test_filetype_header() -> Result<()> {
let dir = PathBuf::from("files/test_site").canonicalize()?;