}
#[test]
fn array() {
assert_eq!(
MetadataHtml(&Value::Array(vec![
Value::Null,
Value::Null,
Value::Text("hello".to_string())
]))
.to_string(),
"<ul><li>null</li><li>null</li><li>hello</li></ul>"
)
}
#[test]
fn map() {
assert_eq!(
MetadataHtml(&Value::Map(
vec![
(Value::Text("b".to_string()), Value::Null),
(
Value::Text("a".to_string()),
Value::Text("hello".to_string())
)
]
.into_iter()
.collect()
))
.to_string(),
"<dl><dt>b</dt><dd>null</dd><dt>a</dt><dd>hello</dd></dl>"
);
assert_eq!(
MetadataHtml(&Value::Map(
vec![(Value::Text("<".to_string()), Value::Null),]
.into_iter()
.collect()
))
.to_string(),
"<dl><dt><</dt><dd>null</dd></dl>"
);
}
}