use glass_easel_template_compiler::*;
#[test]
fn basic_include() {
const SRC_A: &str = r#" "#;
const SRC_B: &str = r#" "#;
let mut group = TmplGroup::new();
group.add_tmpl("a", SRC_A);
group.add_tmpl("b", SRC_B);
assert_eq!(
group.direct_dependencies("a").unwrap().collect::>(),
Vec::::new()
);
assert_eq!(
group.direct_dependencies("b").unwrap().collect::>(),
vec!["a".to_string()]
);
}
#[test]
fn basic_import() {
const SRC_A: &str =
r#" "#;
const SRC_B: &str = r#" "#;
let mut group = TmplGroup::new();
group.add_tmpl("a", SRC_A);
group.add_tmpl("b", SRC_B);
assert_eq!(
group.direct_dependencies("a").unwrap().collect::>(),
Vec::::new()
);
assert_eq!(
group.direct_dependencies("b").unwrap().collect::>(),
vec!["a".to_string()]
);
}