diff --git a/test.js b/test.js index 309f93f..6ed2b1a 100644 --- a/test.js +++ b/test.js @@ -357,6 +357,27 @@ function describeTestsWithOptions(options, postText) { src += '| 3 | 33 | 333 | 3333 |\n'; src += '\n'; src += '{border=1}\n'; + src += '| A |\n'; + src += '| -- |\n'; + src += '| 1 {colspan=3}|\n'; + src += '| 2 |\n'; + src += '| 3 |\n'; + src += '\n'; + src += '{border=2}\n'; + src += '| A | B | C |\n'; + src += '| -- | -- | -- |\n'; + src += '| 1 {rowspan=2}| 11 | 111 |\n'; + src += '| 2 {rowspan=2}| 22 | 222 |\n'; + src += '| 3 | 33 | 333 |\n'; + src += '\n'; + src += '{border=3}\n'; + src += '| A | B | C | D |\n'; + src += '| -- | -- | -- | -- |\n'; + src += '| 1 {colspan=2}| 11 {colspan=3} | 111| 1111 |\n'; + src += '| 2 {rowspan=2} | 22 {colspan=2} | 222 | 2222 |\n'; + src += '| 3 | 33 {colspan=2} | 333 | 3333 |\n'; + src += '\n'; + src += '{border=4}'; expected = '\n'; expected += '\n'; expected += '\n'; @@ -382,6 +403,73 @@ function describeTestsWithOptions(options, postText) { expected += '\n'; expected += '\n'; expected += '
\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '
A
1
2
3
\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '
ABC
111111
222
333
\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '\n'; + expected += '
ABCD
111
222222
333
\n'; assert.equal(md.render(replaceDelimiters(src, options)), expected); });