Added image tests
This commit is contained in:
@@ -97,7 +97,13 @@ codeTests =
|
|||||||
TestList
|
TestList
|
||||||
[ check_equal "Code by itself" "<p><code>Hello world!</code></p>" (convert "`Hello world!`"),
|
[ 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 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`")
|
check_equal "Code across paragraphs (shouldn't work" "<p></p><p></p>" (convert "`Incomplete\n\nCode`") -- At the moment, this is just treated as a syntax error, so nothing is rendered.
|
||||||
|
]
|
||||||
|
|
||||||
|
imageTests =
|
||||||
|
TestList
|
||||||
|
[ check_equal "Image by itself" "<p><img src=\"img.png\" alt=\"Image 1\" /></p>" (convert ""),
|
||||||
|
check_equal "Image with text" "<p>This is an image <img src=\"img.png\" alt=\"Image 1\" /></p>" (convert "This is an image ")
|
||||||
]
|
]
|
||||||
|
|
||||||
integrationTests =
|
integrationTests =
|
||||||
@@ -134,6 +140,7 @@ tests =
|
|||||||
blockquoteTests,
|
blockquoteTests,
|
||||||
unorderedListTests,
|
unorderedListTests,
|
||||||
orderedListTests,
|
orderedListTests,
|
||||||
|
imageTests,
|
||||||
codeTests,
|
codeTests,
|
||||||
integrationTests
|
integrationTests
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user