test/parser_test.rb in trac-wiki-0.3.42 vs test/parser_test.rb in trac-wiki-0.3.43
- old
+ new
@@ -188,14 +188,13 @@
# Italic can be used inside table cells
tc("<table><tr><td>This is <em>italic</em></td>\n</tr>\n</table>\n",
"||This is ''italic''||")
-
# table with div_around_table
- tc("<div class=\"table-div\"><table><tr><td>This is <em>italic</em></td>\n</tr>\n</table>\n</div>\n",
- "||This is ''italic''||", div_around_table: true)
+ tc("<div class=\"table-div\" data-from-line=\"1\" data-to-line=\"2\"><table><tr><td>A</td>\n</tr>\n<tr><td>B</td>\n</tr>\n</table>\n</div>\n",
+ "||A||\n||B||\n", div_around_table: true)
# Links can appear inside italic text:
tc("<p>A italic link: <em><a href=\"http://example.org/\">http://example.org/</a> nice! </em></p>\n",
"A italic link: ''http://example.org/ nice! ''")
@@ -677,9 +676,11 @@
it 'should parse wm-table' do
tc "<table><tr><td>Hello</td>\n<th>World!</th>\n</tr>\n<tr><td>Hello</td>\n<td>World!</td>\n</tr>\n</table>\n", "{|\n|Hello\n!World!\n|-\n|Hello\n|World!\n|}\n\n"
tc "<table><tr><td><strong>Hello</strong></td>\n<td>World!</td>\n</tr>\n<tr><td>Hello</td>\n<td>World!</td>\n</tr>\n</table>\n", "{|\n|**Hello**\n|World!\n|-\n|Hello\n|World!\n|}\n\n"
tc "<table><tr><td><strong>Hello</strong></td>\n<td>Wor ld</td>\n</tr>\n</table>\n", "{|\n|**Hello**\n|Wor\nld\n|}\n\n"
+ tc("<div class=\"table-div\" data-from-line=\"1\" data-to-line=\"3\"><table><tr><td>A</td>\n</tr>\n</table>\n</div>\n",
+ "{|\n|A\n|}\n", div_around_table: true)
end
it 'should parse table' do
tc "<table><tr><td>Hello</td>\n<td>World!</td>\n</tr>\n</table>\n", "||Hello||World!||"
tc "<table><tr><td>Hello</td>\n<td>World!</td>\n</tr>\n<tr><td>Hello</td>\n<td>World!</td>\n</tr>\n</table>\n", "||Hello||World!||\n||Hello||World!||\n\n"
tc "<table><tr><td>Hello</td>\n<td>World!</td>\n</tr>\n<tr><td>Hello</td>\n<td>World!</td>\n</tr>\n</table>\n", "||Hello||World!||\r\n||Hello||World!||\r\n\n"