From b98a8cc44f2584c05dcf78f20a492ae965844938 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Fri, 23 May 2025 14:55:58 -0400 Subject: [PATCH] Added image tests --- src/MdToHtmlTest.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/MdToHtmlTest.hs b/src/MdToHtmlTest.hs index f36c6d8..55cdbe4 100644 --- a/src/MdToHtmlTest.hs +++ b/src/MdToHtmlTest.hs @@ -97,7 +97,13 @@ codeTests = TestList [ check_equal "Code by itself" "

Hello world!

" (convert "`Hello world!`"), check_equal "Code in a paragraph" "

The following text is code

" (convert "The following `text` is code"), - check_equal "Code across paragraphs (shouldn't work" "

`Incomplete

Code`

" (convert "`Incomplete\n\nCode`") + check_equal "Code across paragraphs (shouldn't work" "

" (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" "

\"Image

" (convert "![Image 1](img.png)"), + check_equal "Image with text" "

This is an image \"Image

" (convert "This is an image ![Image 1](img.png)") ] integrationTests = @@ -134,6 +140,7 @@ tests = blockquoteTests, unorderedListTests, orderedListTests, + imageTests, codeTests, integrationTests ]