Added code tests
This commit is contained in:
@@ -93,6 +93,13 @@ orderedListTests =
|
||||
check_equal "Unordered list in ordered list" "<ol><li>Item 1</li><li>Item 2<ul><li>Item 1</li><li>Item 2</li></ul></li><li>Item 3</li></ol>" (convert "1. Item 1\n2. Item 2\n - Item 1\n * Item 2\n4. Item 3")
|
||||
]
|
||||
|
||||
codeTests =
|
||||
TestList
|
||||
[ check_equal "Code by itself" "<p><code>Hello world!</code></p>" (convert "`Hello world!`"),
|
||||
check_equal "Code in a paragraph" "<p>The following <code>text</code> is code</p>" (convert "The following `text` is code"),
|
||||
check_equal "Code across paragraphs (shouldn't work" "<p>`Incomplete</p><p>Code`</p>" (convert "`Incomplete\n\nCode`")
|
||||
]
|
||||
|
||||
integrationTests =
|
||||
TestList
|
||||
[ check_equal "Integration 1" "<h1>Sample Markdown</h1><p>This is some basic, sample markdown.</p><h2><b>Second</b> <i>Heading</i></h2>" (convert "# Sample Markdown\n\n This is some basic, sample markdown.\n\n ## __Second__ _Heading_"),
|
||||
@@ -127,6 +134,7 @@ tests =
|
||||
blockquoteTests,
|
||||
unorderedListTests,
|
||||
orderedListTests,
|
||||
codeTests,
|
||||
integrationTests
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user