summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-18 12:00:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-18 12:00:54 +0000
commit2cc294aa27a2041fdc6b8f1a9d5ab9675dce601f (patch)
treed3ac206ec6902eda6a3bcb7165b7f63d1d0a3aac /test
parentee559c68208227d54b471c4df1264b85d3e88f36 (diff)
downloadredmine-2cc294aa27a2041fdc6b8f1a9d5ab9675dce601f.tar.gz
redmine-2cc294aa27a2041fdc6b8f1a9d5ab9675dce601f.zip
Fixed that textile nested lists are not properly closed in output (#10642).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9430 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb30
1 files changed, 30 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 4253b7152..548a378b5 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -110,6 +110,36 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase
)
end
+ def test_nested_lists
+ raw = <<-RAW
+# Item 1
+# Item 2
+** Item 2a
+** Item 2b
+# Item 3
+** Item 3a
+RAW
+
+ expected = <<-EXPECTED
+<ol>
+ <li>Item 1</li>
+ <li>Item 2
+ <ul>
+ <li>Item 2a</li>
+ <li>Item 2b</li>
+ </ul>
+ </li>
+ <li>Item 3
+ <ul>
+ <li>Item 3a</li>
+ </ul>
+ </li>
+</ol>
+EXPECTED
+
+ assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '')
+ end
+
def test_escaping
assert_html_output(
'this is a <script>' => 'this is a &lt;script&gt;'