summaryrefslogtreecommitdiffstats
path: root/test/unit/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-10 22:05:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-10 22:05:22 +0000
commit956239fc855ae3f7ac4880bba2a4663b2c9a9cc9 (patch)
tree564a48a76841be7e63beab39aa1f61cedccb18e9 /test/unit/lib/redmine/wiki_formatting
parent18061b641fe8671d4fd28c8ab3adfa2fe12f19aa (diff)
downloadredmine-956239fc855ae3f7ac4880bba2a4663b2c9a9cc9.tar.gz
redmine-956239fc855ae3f7ac4880bba2a4663b2c9a9cc9.zip
Fixed: Cannot edit a wiki section which title starts with a tab (#12799).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11159 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib/redmine/wiki_formatting')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb14
1 files changed, 14 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 26f9993d0..88242f54f 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -419,6 +419,20 @@ STR
end
end
+ def test_get_section_should_support_headings_starting_with_a_tab
+ text = <<-STR
+h1.\tHeading 1
+
+Content 1
+
+h1. Heading 2
+
+Content 2
+STR
+
+ assert_match /\Ah1.\tHeading 1\s+Content 1\z/, @formatter.new(text).get_section(1).first
+ end
+
private
def assert_html_output(to_test, expect_paragraph = true)