summaryrefslogtreecommitdiffstats
path: root/test/helpers/application_helper_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-02-03 22:34:08 +0000
committerGo MAEDA <maeda@farend.jp>2019-02-03 22:34:08 +0000
commitf4b2c1a0d3ea597fcaa8dd5a4fd7a2875a7241d3 (patch)
tree19a1cca29eaa2880ae5cea56d78f44feee5e4f90 /test/helpers/application_helper_test.rb
parent1338d96a5ec7706c2c4ea467c74c1ec3f6e3efe3 (diff)
downloadredmine-f4b2c1a0d3ea597fcaa8dd5a4fd7a2875a7241d3.tar.gz
redmine-f4b2c1a0d3ea597fcaa8dd5a4fd7a2875a7241d3.zip
Line height is too large when previewing files with syntax highlighting if the line terminators are CRLF (#30434).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@17847 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers/application_helper_test.rb')
-rw-r--r--test/helpers/application_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb
index 5561e2f40..48304af25 100644
--- a/test/helpers/application_helper_test.rb
+++ b/test/helpers/application_helper_test.rb
@@ -1123,6 +1123,10 @@ EXPECTED
end
end
+ def test_syntax_highlight_should_normalize_line_endings
+ assert_equal "line 1\nline 2\n", syntax_highlight("test.txt", "line 1\rline 2\r\n")
+ end
+
def test_to_path_param
assert_equal 'test1/test2', to_path_param('test1/test2')
assert_equal 'test1/test2', to_path_param('/test1/test2/')