diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index c02733880..90aa1c06f 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1921,6 +1921,15 @@ class ApplicationHelperTest < Redmine::HelperTest assert_nil render_if_exist(:partial => 'non_exist_partial') end + def test_catch_macros_should_support_lf_and_crlf_newline + macro_lf = "{{collapse(text1)\n}}" + macro_crlf = "{{collapse(text1)\r\n}}" + text = +"#{macro_lf}\n#{macro_crlf}\r\n}}" + macros = catch_macros(text) + assert_equal macro_lf, macros[0] + assert_equal macro_crlf, macros[1] + end + private def wiki_links_with_special_characters