1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

Move textile footnotes test to TextileFormatterTest (#28207).

Patch by Mischa The Evil.


git-svn-id: http://svn.redmine.org/redmine/trunk@17222 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2018-03-02 04:58:52 +00:00
parent 8d033d08d0
commit e9fb90856f
2 changed files with 15 additions and 15 deletions

View File

@ -1048,21 +1048,6 @@ EXPECTED
assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---') assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---')
end end
def test_footnotes
raw = <<-RAW
This is some text[1].
fn1. This is the foot note
RAW
expected = <<-EXPECTED
<p>This is some text<sup><a href=\"#fn1\">1</a></sup>.</p>
<p id="fn1" class="footnote"><sup>1</sup> This is the foot note</p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '')
end
def test_headings def test_headings
raw = 'h1. Some heading' raw = 'h1. Some heading'
expected = %|<a name="Some-heading"></a>\n<h1 >Some heading<a href="#Some-heading" class="wiki-anchor">&para;</a></h1>| expected = %|<a name="Some-heading"></a>\n<h1 >Some heading<a href="#Some-heading" class="wiki-anchor">&para;</a></h1>|

View File

@ -581,6 +581,21 @@ STR
}, false) }, false)
end end
def test_footnotes
text = <<-STR
This is some text[1].
fn1. This is the foot note
STR
expected = <<-EXPECTED
<p>This is some text<sup><a href=\"#fn1\">1</a></sup>.</p>
<p id="fn1" class="footnote"><sup>1</sup> This is the foot note</p>
EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '')
end
private private
def assert_html_output(to_test, expect_paragraph = true) def assert_html_output(to_test, expect_paragraph = true)