|
|
|
@ -807,7 +807,10 @@ mod tests {
|
|
|
|
|
assert_eq!(super::special("{~rb}"), Ok(("", Special::RightCurlyBrace)));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
super::special("{~zzz}"),
|
|
|
|
|
Err(Error(("zzz}", ErrorKind::Tag)))
|
|
|
|
|
Err(Error(nom::error::Error {
|
|
|
|
|
input: "zzz}",
|
|
|
|
|
code: ErrorKind::Tag
|
|
|
|
|
}))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -824,10 +827,10 @@ mod tests {
|
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
super::special("{! this is a comment without a close"),
|
|
|
|
|
Err(Error((
|
|
|
|
|
"{! this is a comment without a close",
|
|
|
|
|
ErrorKind::Tag
|
|
|
|
|
)))
|
|
|
|
|
Err(Error(nom::error::Error {
|
|
|
|
|
input: "{! this is a comment without a close",
|
|
|
|
|
code: ErrorKind::Tag
|
|
|
|
|
}))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -861,7 +864,10 @@ mod tests {
|
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
super::span("{~lb}"),
|
|
|
|
|
Err(Error(("{~lb}", ErrorKind::Verify)))
|
|
|
|
|
Err(Error(nom::error::Error {
|
|
|
|
|
input: "{~lb}",
|
|
|
|
|
code: ErrorKind::Verify
|
|
|
|
|
}))
|
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
super::body("this is \t \n\n \t \n \t multiline text\n {foo}"),
|
|
|
|
@ -911,7 +917,10 @@ mod tests {
|
|
|
|
|
fn test_section_mismatched_paths() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
super::dust_tag("{#foo.bar}{/baz}"),
|
|
|
|
|
Err(Error(("{#foo.bar}{/baz}", ErrorKind::Tag)))
|
|
|
|
|
Err(Error(nom::error::Error {
|
|
|
|
|
input: "{#foo.bar}{/baz}",
|
|
|
|
|
code: ErrorKind::Tag
|
|
|
|
|
}))
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1539,7 +1548,7 @@ mod tests {
|
|
|
|
|
{.}
|
|
|
|
|
{/names}"
|
|
|
|
|
),
|
|
|
|
|
Ok::<_, nom::Err<(&str, ErrorKind)>>((
|
|
|
|
|
Ok::<_, nom::Err<nom::error::Error<&str>>>((
|
|
|
|
|
"",
|
|
|
|
|
Template {
|
|
|
|
|
contents: Body {
|
|
|
|
@ -1613,7 +1622,7 @@ mod tests {
|
|
|
|
|
super::template(
|
|
|
|
|
r#"{#level3.level4}{>partialtwo v1="b" v2="b" v3="b" v4="b" v5="b" /}{/level3.level4}"#
|
|
|
|
|
),
|
|
|
|
|
Ok::<_, nom::Err<(&str, ErrorKind)>>((
|
|
|
|
|
Ok::<_, nom::Err<nom::error::Error<&str>>>((
|
|
|
|
|
"",
|
|
|
|
|
Template {
|
|
|
|
|
contents: Body {
|
|
|
|
|