Works fine with the partial but without parameters.

This commit is contained in:
Tom Alexander 2020-05-09 15:08:31 -04:00
parent 569b4594be
commit 710785139a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -1056,7 +1056,7 @@ mod tests {
#[test] #[test]
fn test_full_document_temp() { fn test_full_document_temp() {
assert_eq!( assert_eq!(
super::template(r#"{#level3.level4}{/level3.level4}"#), super::template(r#"{#level3.level4}{>partialtwo/}{/level3.level4}"#),
Ok::<_, nom::Err<(&str, ErrorKind)>>(( Ok::<_, nom::Err<(&str, ErrorKind)>>((
"", "",
Template { Template {
@ -1065,7 +1065,14 @@ mod tests {
path: Path { path: Path {
keys: vec!["level3", "level4"] keys: vec!["level3", "level4"]
}, },
contents: None, contents: Some(Body {
elements: vec![TemplateElement::TETag(DustTag::DTPartial(
Partial {
name: "partialtwo".to_owned(),
params: vec![]
}
))]
}),
else_contents: None else_contents: None
}))] }))]
} }