From 369fbaf579ba5900e07ebab155beabd5078ea1f6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 9 May 2020 15:11:04 -0400 Subject: [PATCH] works fine with one parameter. --- src/parser/parser.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 467521f..44587ca 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1054,9 +1054,9 @@ mod tests { } #[test] - fn test_full_document_temp() { + fn test_full_document_parameterized_partial() { 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)>>(( "", Template { @@ -1069,7 +1069,10 @@ mod tests { elements: vec![TemplateElement::TETag(DustTag::DTPartial( Partial { name: "partialtwo".to_owned(), - params: vec![] + params: vec![KVPair { + key: "v1", + value: RValue::RVString("b".to_owned()) + }] } ))] }),