From 700f1f5bfb48a80e9e4658a1112d5115cc9da8d4 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 15 Jun 2022 12:16:53 +0200 Subject: Add tests for text --- tests/text.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/text.rs 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"), + "

hello $.;'there

", + "should support ascii text" + ); + + assert_eq!( + micromark("Foo χρῆν"), + "

Foo χρῆν

", + "should support unicode text" + ); + + assert_eq!( + micromark("Multiple spaces"), + "

Multiple spaces

", + "should preserve internal spaces verbatim" + ); +} -- cgit