summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-14 16:29:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-14 16:29:59 +0000
commitb3d80d50a3a1f8bdf7ada546898ecb1818947b05 (patch)
tree92731357a9e528d8ef9a0d80bdae466242cb4467 /test/unit/lib
parent28ca9d240a8908797f68b1652b6e7a6d3c21c332 (diff)
downloadredmine-b3d80d50a3a1f8bdf7ada546898ecb1818947b05.tar.gz
redmine-b3d80d50a3a1f8bdf7ada546898ecb1818947b05.zip
Fixed that ordered/unordered lists inside table cell are mangled (#14038).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11845 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
index 69c697daa..324cea1e6 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -268,6 +268,42 @@ EXPECTED
assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '')
end
+ def test_tables_with_lists
+ raw = <<-RAW
+This is a table with lists:
+
+|cell11|cell12|
+|cell21|ordered list
+# item
+# item 2|
+|cell31|unordered list
+* item
+* item 2|
+
+RAW
+
+ expected = <<-EXPECTED
+<p>This is a table with lists:</p>
+
+<table>
+ <tr>
+ <td>cell11</td>
+ <td>cell12</td>
+ </tr>
+ <tr>
+ <td>cell21</td>
+ <td>ordered list<br /># item<br /># item 2</td>
+ </tr>
+ <tr>
+ <td>cell31</td>
+ <td>unordered list<br />* item<br />* item 2</td>
+ </tr>
+</table>
+EXPECTED
+
+ assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '')
+ end
+
def test_textile_should_not_mangle_brackets
assert_equal '<p>[msg1][msg2]</p>', to_html('[msg1][msg2]')
end