Defect #35754

Redmine::WikiFormatting::CommonMark::FormatterTest#test_should_ignore_soft_breaks fails

Added by Go MAEDA 4 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:


Target version:-
Resolution:Fixed Affected version:


A test added by #32424 fails.

Redmine::WikiFormatting::CommonMark::FormatterTest#test_should_ignore_soft_breaks [/Users/maeda/redmines/redmine-trunk/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:40]:
--- expected
+++ actual
@@ -1,2 +1,2 @@

rails test test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:39

Since hard breaks are enabled by default in the trunk, the test should be changed as follows:

diff --git a/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
index b92121c55..d121d5425 100644
--- a/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
@@ -36,8 +36,8 @@ class Redmine::WikiFormatting::CommonMark::FormatterTest < ActionView::TestCase
       assert_equal html, format("foo  \nbar")

-    def test_should_ignore_soft_breaks
-      assert_equal "<p>foo\nbar</p>", format("foo\nbar")
+    def test_should_render_soft_breaks
+      assert_equal "<p>foo<br>\nbar</p>", format("foo\nbar")

     def test_syntax_error_in_image_reference_should_not_raise_exception

Related issues

Related to Redmine - Feature #32424: CommonMark Markdown Text Formatting Closed

Associated revisions

Revision 21177
Added by Marius BALTEANU 4 months ago

Update failing test after hardbreaks enabled by default (#35754, #32424).

Patch by Go MAEDA.


#1 Updated by Go MAEDA 4 months ago

  • Related to Feature #32424: CommonMark Markdown Text Formatting added

#2 Updated by Marius BALTEANU 4 months ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Patch committed, thanks for pointing this out.

Also available in: Atom PDF