Add test for quoted partial
This commit is contained in:
parent
e2f03de297
commit
2ebe4798d5
@ -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())
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user