diff --git a/src/Test.hs b/src/Test.hs
index e4333d1..28c627b 100644
--- a/src/Test.hs
+++ b/src/Test.hs
@@ -3,6 +3,8 @@ module MdToHtmlTest where
import MdToHTML
import Test.HUnit
+check_equal expected actual
+
headerTests = TestList
[
(TestCase (assertEqual "Should convert H1 heading" "
Hello
" (show . fst $ leftmostLongestParse parseLine "# Hello"))),
@@ -13,10 +15,17 @@ headerTests = TestList
(TestCase (assertEqual "Should convert H6 heading" "Hello
" (show . fst $ leftmostLongestParse parseLine "###### Hello")))
]
+boldTests = TestList
+ [
+ (TestCase (assertEqual "Should convert bold" "Hello" (show . fst $ leftmostLongestParse parseLine "__Hello__"))),
+ (TestCase (assertEqual "Should convert italic" "Hello" (show . fst $ leftmostLongestParse parseLine "_Hello_"))),
+ (TestCase (assertEqual "Should convert bold and italic in a sentence" "It is a wonderful day" (show . fst $ leftmostLongestParse parseLine "It _is_ a __wonderful__ day")))
+ ]
tests = TestList
[
- headerTests
+ headerTests,
+ boldTests
]
runTests = runTestTT tests