diff options
| author | Asko Nõmm <asko@bien.ee> | 2022-04-21 19:13:02 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@bien.ee> | 2022-04-21 19:13:02 +0300 |
| commit | 04821d8be5d773153718948454c864495704f67b (patch) | |
| tree | 2b4bf3433ca40f30d0dbd282895e70021a769eda /test | |
| parent | a178a0b1867cb5194a1a2cd4f6e01ac261bfa4b7 (diff) | |
Send correctors to each render as well
Diffstat (limited to 'test')
| -rw-r--r-- | test/clarktown/renderers/bold_test.clj | 6 | ||||
| -rw-r--r-- | test/clarktown/renderers/code_block_test.clj | 4 | ||||
| -rw-r--r-- | test/clarktown/renderers/empty_block_test.clj | 2 | ||||
| -rw-r--r-- | test/clarktown/renderers/heading_block_test.clj | 18 | ||||
| -rw-r--r-- | test/clarktown/renderers/horizontal_line_block_test.clj | 4 | ||||
| -rw-r--r-- | test/clarktown/renderers/inline_code_test.clj | 4 | ||||
| -rw-r--r-- | test/clarktown/renderers/italic_test.clj | 6 | ||||
| -rw-r--r-- | test/clarktown/renderers/link_and_image_test.clj | 10 | ||||
| -rw-r--r-- | test/clarktown/renderers/quote_block_test.clj | 2 | ||||
| -rw-r--r-- | test/clarktown/renderers/strikethrough_test.clj | 4 |
10 files changed, 30 insertions, 30 deletions
diff --git a/test/clarktown/renderers/bold_test.clj b/test/clarktown/renderers/bold_test.clj index fba0ea6..28d9da8 100644 --- a/test/clarktown/renderers/bold_test.clj +++ b/test/clarktown/renderers/bold_test.clj @@ -7,12 +7,12 @@ (deftest bold-renderer-test (testing "Creating bold text with two surrounding asterisk characters" (is (= "<strong>This is bold.</strong>" - (bold/render "**This is bold.**" nil)))) + (bold/render "**This is bold.**" nil nil)))) (testing "Creating bold text with two surrounding underscore characters" (is (= "<strong>This is bold.</strong>" - (bold/render "__This is bold.__" nil)))) + (bold/render "__This is bold.__" nil nil)))) (testing "Creating bold text with both underscores and asterisks mixed" (is (= "Hi, my name is <strong>John</strong>, what is <strong>your name?</strong>" - (bold/render "Hi, my name is **John**, what is __your name?__" nil)))))
\ No newline at end of file + (bold/render "Hi, my name is **John**, what is __your name?__" nil nil)))))
\ No newline at end of file diff --git a/test/clarktown/renderers/code_block_test.clj b/test/clarktown/renderers/code_block_test.clj index 37c701b..c5779be 100644 --- a/test/clarktown/renderers/code_block_test.clj +++ b/test/clarktown/renderers/code_block_test.clj @@ -8,8 +8,8 @@ (deftest code-block-renderer-test (testing "Code block with language specification" (is (= (slurp (io/file (io/resource "test/parsers/code_block_result.html"))) - (code-block/render (slurp (io/file (io/resource "test/parsers/code_block.md"))) nil)))) + (code-block/render (slurp (io/file (io/resource "test/parsers/code_block.md"))) nil nil)))) (testing "Code block with NO language specification" (is (= (slurp (io/file (io/resource "test/parsers/code_block_no_language_result.html"))) - (code-block/render (slurp (io/file (io/resource "test/parsers/code_block_no_language.md"))) nil)))))
\ No newline at end of file + (code-block/render (slurp (io/file (io/resource "test/parsers/code_block_no_language.md"))) nil nil)))))
\ No newline at end of file diff --git a/test/clarktown/renderers/empty_block_test.clj b/test/clarktown/renderers/empty_block_test.clj index 35fb902..da0fc7c 100644 --- a/test/clarktown/renderers/empty_block_test.clj +++ b/test/clarktown/renderers/empty_block_test.clj @@ -6,5 +6,5 @@ (deftest empty-block-renderer-test (testing "Rendering an empty block" - (is (= (empty-block/render "" nil) + (is (= (empty-block/render "" nil nil) "")))) diff --git a/test/clarktown/renderers/heading_block_test.clj b/test/clarktown/renderers/heading_block_test.clj index 9c3386f..2196422 100644 --- a/test/clarktown/renderers/heading_block_test.clj +++ b/test/clarktown/renderers/heading_block_test.clj @@ -7,38 +7,38 @@ (deftest atx-heading-renderer-test (testing "Hashbang heading block that's a H1" (is (= "<h1>This is a heading block.</h1>" - (heading-block/render "# This is a heading block." nil)))) + (heading-block/render "# This is a heading block." nil nil)))) (testing "Hashbang heading block that's a H2" (is (= "<h2>This is a heading block.</h2>" - (heading-block/render "## This is a heading block." nil)))) + (heading-block/render "## This is a heading block." nil nil)))) (testing "Hashbang heading block that's a H3" (is (= "<h3>This is a heading block.</h3>" - (heading-block/render "### This is a heading block." nil)))) + (heading-block/render "### This is a heading block." nil nil)))) (testing "Hashbang heading block that's a H4" (is (= "<h4>This is a heading block.</h4>" - (heading-block/render "#### This is a heading block." nil)))) + (heading-block/render "#### This is a heading block." nil nil)))) (testing "Hashbang heading block that's a H5" (is (= "<h5>This is a heading block.</h5>" - (heading-block/render "##### This is a heading block." nil))))) + (heading-block/render "##### This is a heading block." nil nil))))) (deftest settext-heading-renderer-text (testing "Settext heading block that's a H1" (is (= "<h1>This is a heading block.</h1>" - (heading-block/render "This is a heading block.\n=========" nil)))) + (heading-block/render "This is a heading block.\n=========" nil nil)))) (testing "Settext heading block that's a H1 spanning multiple lines" (is (= "<h1>This is a \nheading block spanning multiple lines.</h1>" - (heading-block/render "This is a \nheading block spanning multiple lines.\n========" nil)))) + (heading-block/render "This is a \nheading block spanning multiple lines.\n========" nil nil)))) (testing "Settext heading block that's a H2" (is (= "<h2>This is a heading block.</h2>" - (heading-block/render "This is a heading block.\n---------" nil)))) + (heading-block/render "This is a heading block.\n---------" nil nil)))) (testing "Settext heading block that's a H2 spanning multiple lines" (is (= "<h2>This is a \nheading block spanning multiple lines.</h2>" - (heading-block/render "This is a \nheading block spanning multiple lines.\n--------" nil)))))
\ No newline at end of file + (heading-block/render "This is a \nheading block spanning multiple lines.\n--------" nil nil)))))
\ No newline at end of file diff --git a/test/clarktown/renderers/horizontal_line_block_test.clj b/test/clarktown/renderers/horizontal_line_block_test.clj index db72682..9b23607 100644 --- a/test/clarktown/renderers/horizontal_line_block_test.clj +++ b/test/clarktown/renderers/horizontal_line_block_test.clj @@ -6,8 +6,8 @@ (deftest horizontal-line-block-renderer-test (testing "Creating a horizontal line" - (is (= (horizontal-line-block/render "***" nil) + (is (= (horizontal-line-block/render "***" nil nil) "<hr>")) - (is (= (horizontal-line-block/render "---" nil) + (is (= (horizontal-line-block/render "---" nil nil) "<hr>")))) diff --git a/test/clarktown/renderers/inline_code_test.clj b/test/clarktown/renderers/inline_code_test.clj index 2071b7f..b1b277e 100644 --- a/test/clarktown/renderers/inline_code_test.clj +++ b/test/clarktown/renderers/inline_code_test.clj @@ -7,8 +7,8 @@ (deftest inline-code-renderer-test (testing "Creating inline code text" (is (= "<code>This is inline code.</code>" - (inline-code/render "`This is inline code.`" nil)))) + (inline-code/render "`This is inline code.`" nil nil)))) (testing "Creating inline-code text in the middle of regular text" (is (= "This is regular text, mixed with <code>some inline code.</code>, and it's great." - (inline-code/render "This is regular text, mixed with `some inline code.`, and it's great." nil)))))
\ No newline at end of file + (inline-code/render "This is regular text, mixed with `some inline code.`, and it's great." nil nil)))))
\ No newline at end of file diff --git a/test/clarktown/renderers/italic_test.clj b/test/clarktown/renderers/italic_test.clj index 29e7811..e85ee36 100644 --- a/test/clarktown/renderers/italic_test.clj +++ b/test/clarktown/renderers/italic_test.clj @@ -7,12 +7,12 @@ (deftest italic-renderer-test (testing "Creating italic text with one surrounding asterisk character" (is (= "<em>This is italic.</em>" - (italic/render "*This is italic.*" nil)))) + (italic/render "*This is italic.*" nil nil)))) (testing "Creating italic text with one surrounding underscore character" (is (= "<em>This is italic.</em>" - (italic/render "_This is italic._" nil)))) + (italic/render "_This is italic._" nil nil)))) (testing "Creating italic text with both underscores and asterisks mixed" (is (= "Hi, my name is <em>John</em>, what is <em>your name?</em>" - (italic/render "Hi, my name is *John*, what is _your name?_" nil)))))
\ No newline at end of file + (italic/render "Hi, my name is *John*, what is _your name?_" nil nil)))))
\ No newline at end of file diff --git a/test/clarktown/renderers/link_and_image_test.clj b/test/clarktown/renderers/link_and_image_test.clj index aa821e3..d17e070 100644 --- a/test/clarktown/renderers/link_and_image_test.clj +++ b/test/clarktown/renderers/link_and_image_test.clj @@ -6,18 +6,18 @@ (deftest link-renderer-test (testing "Creating a link" - (is (= (link-and-image/render "[This is a link](https://example.com)" nil) + (is (= (link-and-image/render "[This is a link](https://example.com)" nil nil) "<a href=\"https://example.com\">This is a link</a>")) - (is (= (link-and-image/render "[This-is-a-link](https://example.com)" nil) + (is (= (link-and-image/render "[This-is-a-link](https://example.com)" nil nil) "<a href=\"https://example.com\">This-is-a-link</a>")) - (is (= (link-and-image/render "[x] [label](link)" nil) + (is (= (link-and-image/render "[x] [label](link)" nil nil) "[x] <a href=\"link\">label</a>")) - (is (= (link-and-image/render "[ ] [label](link)" nil) + (is (= (link-and-image/render "[ ] [label](link)" nil nil) "[ ] <a href=\"link\">label</a>"))) (testing "Creating an image" - (is (= (link-and-image/render "" nil) + (is (= (link-and-image/render "" nil nil) "<img src=\"https://example.com\" alt=\"This is an image\">"))))
\ No newline at end of file diff --git a/test/clarktown/renderers/quote_block_test.clj b/test/clarktown/renderers/quote_block_test.clj index 33a7495..1065a85 100644 --- a/test/clarktown/renderers/quote_block_test.clj +++ b/test/clarktown/renderers/quote_block_test.clj @@ -6,5 +6,5 @@ (deftest quote-block-block-renderer-test (testing "Creating a quote block line" - (is (= (quote-block/render "> First line\n> second line" nil) + (is (= (quote-block/render "> First line\n> second line" nil nil) "<blockquote>First line\nsecond line</blockquote>"))))
\ No newline at end of file diff --git a/test/clarktown/renderers/strikethrough_test.clj b/test/clarktown/renderers/strikethrough_test.clj index 55493e0..cf08fc9 100644 --- a/test/clarktown/renderers/strikethrough_test.clj +++ b/test/clarktown/renderers/strikethrough_test.clj @@ -6,9 +6,9 @@ (deftest strikethrough-renderer-test (testing "Creating strikethrough text" - (is (= (strikethrough/render "~~This is strikethrough text.~~" nil) + (is (= (strikethrough/render "~~This is strikethrough text.~~" nil nil) "<del>This is strikethrough text.</del>"))) (testing "Creating strikethrough text mixed with regular text" - (is (= (strikethrough/render "Some other text, ~~This is strikethrough text.~~ And more text." nil) + (is (= (strikethrough/render "Some other text, ~~This is strikethrough text.~~ And more text." nil nil) "Some other text, <del>This is strikethrough text.</del> And more text."))))
\ No newline at end of file |
