From ee7ab7fd1163a1a8444e16017793eb32a0eb08ee Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sat, 30 Apr 2022 12:09:32 +0300 Subject: Close #22, Close #23 --- test/clarktown/renderers/heading_block_test.clj | 26 ++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'test/clarktown') diff --git a/test/clarktown/renderers/heading_block_test.clj b/test/clarktown/renderers/heading_block_test.clj index 2196422..7647b53 100644 --- a/test/clarktown/renderers/heading_block_test.clj +++ b/test/clarktown/renderers/heading_block_test.clj @@ -5,25 +5,37 @@ (deftest atx-heading-renderer-test - (testing "Hashbang heading block that's a H1" + (testing "ATX heading block that's a H1" (is (= "

This is a heading block.

" (heading-block/render "# This is a heading block." nil nil)))) - (testing "Hashbang heading block that's a H2" + (testing "ATX heading block that's a H2" (is (= "

This is a heading block.

" (heading-block/render "## This is a heading block." nil nil)))) - (testing "Hashbang heading block that's a H3" + (testing "ATX heading block that's a H3" (is (= "

This is a heading block.

" (heading-block/render "### This is a heading block." nil nil)))) - (testing "Hashbang heading block that's a H4" + (testing "ATX heading block that's a H4" (is (= "

This is a heading block.

" (heading-block/render "#### This is a heading block." nil nil)))) - (testing "Hashbang heading block that's a H5" + (testing "ATX heading block that's a H5" (is (= "
This is a heading block.
" - (heading-block/render "##### This is a heading block." nil nil))))) + (heading-block/render "##### This is a heading block." nil nil)))) + + (testing "ATX heading block that's a H6" + (is (= "
This is a heading block.
" + (heading-block/render "###### This is a heading block." nil nil)))) + + (testing "No H tag when 7 or more # characters" + (is (= "####### This is not a heading block." + (heading-block/render "####### This is not a heading block." nil nil)))) + + (testing "No H tag when there is no space between # characters and value" + (is (= "#This is not a heading block." + (heading-block/render "#This is not a heading block." nil nil))))) (deftest settext-heading-renderer-text @@ -41,4 +53,4 @@ (testing "Settext heading block that's a H2 spanning multiple lines" (is (= "

This is a \nheading block spanning multiple lines.

" - (heading-block/render "This is a \nheading block spanning multiple lines.\n--------" nil nil))))) \ No newline at end of file + (heading-block/render "This is a \nheading block spanning multiple lines.\n--------" nil nil))))) -- cgit v1.2.3