Added tests for tables
This commit is contained in:
@@ -118,6 +118,17 @@ horizontalRuleTests =
|
||||
TestList
|
||||
[check_equal "Horizontal Rule" "<p>a</p><hr><p>b</p>" (convert "a\n\n---\n\nb")]
|
||||
|
||||
tableTests =
|
||||
TestList
|
||||
[ check_equal
|
||||
"Basic table"
|
||||
"<table>\
|
||||
\<thead><tr><th>Col 1</th><th>Col 2</th><th>Col 3</th></tr></thead>\
|
||||
\<tbody><tr><td>Data 1</td><td>Data 2</td><td>Data 3</td></tr>\
|
||||
\<tr><td>More Data 1</td><td>More Data 2</td><td>More Data 3</td></tr></tbody></table>"
|
||||
(convert "| Col 1 | Col 2 | Col 3 |\n|---|---|---|\n| Data 1 | Data 2 | Data 3 |\n| More Data 1 | More Data 2 | More Data 3 |")
|
||||
]
|
||||
|
||||
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_"),
|
||||
@@ -157,6 +168,7 @@ tests =
|
||||
figureTests,
|
||||
codeTests,
|
||||
horizontalRuleTests,
|
||||
tableTests,
|
||||
integrationTests
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user