Add test for quoted partial

This commit is contained in:
Tom Alexander 2020-04-07 19:53:57 -04:00
parent e2f03de297
commit 2ebe4798d5
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 23 additions and 0 deletions

View File

@ -710,4 +710,27 @@ mod tests {
))
);
}
#[test]
fn test_quoted_partial() {
assert_eq!(
dust_tag(r#"{>"template name * with * special \" characters" bar=baz animal="cat"/}"#),
Ok((
"",
DustTag::DTPartial(ParameterizedBlock {
name: r#"template name * with * special " characters"#.to_owned(),
params: vec![
KVPair {
key: "bar",
value: RValue::RVPath(Path { keys: vec!["baz"] })
},
KVPair {
key: "animal",
value: RValue::RVString("cat".to_owned())
}
]
})
))
);
}
}