aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc_tabs.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-09-07 15:53:06 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-09-07 15:53:06 +0200
commit1d92666865b35341e076efbefddf6e73b5e1542e (patch)
tree11c05985ec7679f73473e7ea2c769465698e2f08 /tests/misc_tabs.rs
parente6018e52ee6ad9a8f8a0672b75bf515faf74af1f (diff)
downloadmarkdown-rs-1d92666865b35341e076efbefddf6e73b5e1542e.tar.gz
markdown-rs-1d92666865b35341e076efbefddf6e73b5e1542e.tar.bz2
markdown-rs-1d92666865b35341e076efbefddf6e73b5e1542e.zip
Add support for recoverable syntax errors
Diffstat (limited to '')
-rw-r--r--tests/misc_tabs.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/misc_tabs.rs b/tests/misc_tabs.rs
index 138aa7b..feb8177 100644
--- a/tests/misc_tabs.rs
+++ b/tests/misc_tabs.rs
@@ -3,7 +3,7 @@ use micromark::{micromark, micromark_with_options, Options};
use pretty_assertions::assert_eq;
#[test]
-fn tabs_flow() {
+fn tabs_flow() -> Result<(), String> {
let danger = &Options {
allow_dangerous_html: true,
..Options::default()
@@ -112,7 +112,7 @@ fn tabs_flow() {
);
assert_eq!(
- micromark_with_options("<x\ty\tz\t=\t\"\tx\t\">", danger),
+ micromark_with_options("<x\ty\tz\t=\t\"\tx\t\">", danger)?,
"<x\ty\tz\t=\t\"\tx\t\">",
"should support tabs in HTML (if whitespace is allowed)"
);
@@ -128,10 +128,12 @@ fn tabs_flow() {
"<hr />",
"should support arbitrary tabs in thematic breaks"
);
+
+ Ok(())
}
#[test]
-fn tabs_text() {
+fn tabs_text() -> Result<(), String> {
assert_eq!(
micromark("<http:\t>"),
"<p>&lt;http:\t&gt;</p>",
@@ -249,10 +251,12 @@ fn tabs_text() {
"<p><a href=\"y\" title=\"z\">x</a></p>",
"should support a tab between a link destination and title"
);
+
+ Ok(())
}
#[test]
-fn tabs_virtual_spaces() {
+fn tabs_virtual_spaces() -> Result<(), String> {
assert_eq!(
micromark("```\n\tx"),
"<pre><code>\tx\n</code></pre>\n",
@@ -284,4 +288,6 @@ fn tabs_virtual_spaces() {
// "<ul>\n<li>\n<p>a</p>\n<p>b</p>\n</li>\n</ul>",
"should support a part of a tab as a container, and the rest of a tab as flow"
);
+
+ Ok(())
}