From 710785139aa54f99c73c5269f0cfccf82b29d0d9 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 9 May 2020 15:08:31 -0400 Subject: [PATCH] Works fine with the partial but without parameters. --- src/parser/parser.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index e7e6fe0..467521f 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1056,7 +1056,7 @@ mod tests { #[test] fn test_full_document_temp() { assert_eq!( - super::template(r#"{#level3.level4}{/level3.level4}"#), + super::template(r#"{#level3.level4}{>partialtwo/}{/level3.level4}"#), Ok::<_, nom::Err<(&str, ErrorKind)>>(( "", Template { @@ -1065,7 +1065,14 @@ mod tests { path: Path { 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 }))] }