works fine without the partial.

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

View File

@ -1056,13 +1056,19 @@ mod tests {
#[test] #[test]
fn test_full_document_temp() { fn test_full_document_temp() {
assert_eq!( assert_eq!(
super::template( super::template(r#"{#level3.level4}{/level3.level4}"#),
r#"{#level3.level4}{>partialtwo v1="b" v2="b" v3="b" v4="b" v5="b" /}{/level3.level4}"#
),
Ok::<_, nom::Err<(&str, ErrorKind)>>(( Ok::<_, nom::Err<(&str, ErrorKind)>>((
"", "",
Template { Template {
contents: Body { elements: vec![] } contents: Body {
elements: vec![TemplateElement::TETag(DustTag::DTSection(Container {
path: Path {
keys: vec!["level3", "level4"]
},
contents: None,
else_contents: None
}))]
}
} }
)) ))
); );