works fine with one parameter.

This commit is contained in:
Tom Alexander 2020-05-09 15:11:04 -04:00
parent 710785139a
commit 369fbaf579
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -1054,9 +1054,9 @@ mod tests {
} }
#[test] #[test]
fn test_full_document_temp() { fn test_full_document_parameterized_partial() {
assert_eq!( assert_eq!(
super::template(r#"{#level3.level4}{>partialtwo/}{/level3.level4}"#), super::template(r#"{#level3.level4}{>partialtwo v1="b"/}{/level3.level4}"#),
Ok::<_, nom::Err<(&str, ErrorKind)>>(( Ok::<_, nom::Err<(&str, ErrorKind)>>((
"", "",
Template { Template {
@ -1069,7 +1069,10 @@ mod tests {
elements: vec![TemplateElement::TETag(DustTag::DTPartial( elements: vec![TemplateElement::TETag(DustTag::DTPartial(
Partial { Partial {
name: "partialtwo".to_owned(), name: "partialtwo".to_owned(),
params: vec![] params: vec![KVPair {
key: "v1",
value: RValue::RVString("b".to_owned())
}]
} }
))] ))]
}), }),