test_for_8395.patch

Marius BALTEANU, 2018-11-26 00:42

Download (818 Bytes)

View differences:

test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
605 605
    assert_nothing_raised { to_html(" \v") }
606 606
  end
607 607

  
608
  def test_should_not_handle_as_preformatted_text_tags_that_starts_with_pre
609
    text = <<-STR
610
<pree>
611
  This is some text
612
</pree>
613
STR
614

  
615
    expected = <<-EXPECTED
616
<p>&lt;pree&gt;<br />
617
  This is some text<br />
618
&lt;/pree&gt;</p>
619
EXPECTED
620

  
621
    assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '')
622
  end
623

  
608 624
  private
609 625

  
610 626
  def assert_html_output(to_test, expect_paragraph = true)