aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc_zero.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/misc_zero.rs19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/misc_zero.rs b/tests/misc_zero.rs
index dbe0836..ed9f1bc 100644
--- a/tests/misc_zero.rs
+++ b/tests/misc_zero.rs
@@ -1,8 +1,12 @@
-use markdown::to_html;
+use markdown::{
+ mdast::{Node, Root},
+ to_html, to_mdast,
+ unist::Position,
+};
use pretty_assertions::assert_eq;
#[test]
-fn zero() {
+fn zero() -> Result<(), String> {
assert_eq!(to_html(""), "", "should support no markdown");
assert_eq!(
@@ -24,4 +28,15 @@ fn zero() {
"<p>\\0</p>",
"should not support NUL in a character escape"
);
+
+ assert_eq!(
+ to_mdast("", &Default::default())?,
+ Node::Root(Root {
+ children: vec![],
+ position: Some(Position::new(1, 1, 0, 1, 1, 0))
+ }),
+ "should support no markdown (ast)"
+ );
+
+ Ok(())
}