diff --git a/src/Test.hs b/src/Test.hs index 40f6bef..60d2365 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -26,19 +26,35 @@ boldTests = check_equal "Should convert bold and italic in a sentence" "
It is a wonderful day
" (convert "It _is_ a __wonderful__ day") ] +linkTests = + TestList + [ check_equal "Should convert normal link" "" (convert "[This is an example link.](https://example.com)"), + check_equal "Should convert styled link" "" (convert "[__Fancy__!!!](https://example.com)") + ] + +escapedCharTests = + TestList + [ check_equal "Should print literal underscore" "This is an underscore - _
" (convert "This is an underscore - \\_"), + check_equal "Should print literal asterisk" "This is an asterisk - *
" (convert "This is an asterisk - \\*"), + check_equal "Should print literal asterisk in bold" "This is a bolded asterisk - *
" (convert "This is a bolded asterisk - **\\***") + ] + integrationTests = TestList [ check_equal "Integration 1" "This is some basic, sample markdown.
Hello World
" (convert "__Hello__\n_World_"), check_equal "Integration 3" "World
" (convert "# Hello\nWorld"), check_equal "Integration 4" "a b
" (convert "a\nb"), - check_equal "Integration 5" "First line
Second line