aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-15 12:16:53 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-15 12:16:53 +0200
commit700f1f5bfb48a80e9e4658a1112d5115cc9da8d4 (patch)
treeb77197bb33fb9eb3f1666aae35dadca405123af8
parentdf5b39f8c1cb6b3f3a8a19c5a4722433e2ef1dff (diff)
downloadmarkdown-rs-700f1f5bfb48a80e9e4658a1112d5115cc9da8d4.tar.gz
markdown-rs-700f1f5bfb48a80e9e4658a1112d5115cc9da8d4.tar.bz2
markdown-rs-700f1f5bfb48a80e9e4658a1112d5115cc9da8d4.zip
Add tests for text
-rw-r--r--tests/text.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/text.rs b/tests/text.rs
new file mode 100644
index 0000000..7db9e1a
--- /dev/null
+++ b/tests/text.rs
@@ -0,0 +1,23 @@
+extern crate micromark;
+use micromark::micromark;
+
+#[test]
+fn text() {
+ assert_eq!(
+ micromark("hello $.;'there"),
+ "<p>hello $.;'there</p>",
+ "should support ascii text"
+ );
+
+ assert_eq!(
+ micromark("Foo χρῆν"),
+ "<p>Foo χρῆν</p>",
+ "should support unicode text"
+ );
+
+ assert_eq!(
+ micromark("Multiple spaces"),
+ "<p>Multiple spaces</p>",
+ "should preserve internal spaces verbatim"
+ );
+}