diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-27 08:36:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-27 08:36:13 +0000 |
commit | c2e613981a138bab2362519c5c3952b0d318c157 (patch) | |
tree | 4a6d85d96b528713100439a610274c7ecb7cf44f /test/unit | |
parent | d54ede781b60207dc9163e5953c04a52bac82c42 (diff) | |
download | redmine-c2e613981a138bab2362519c5c3952b0d318c157.tar.gz redmine-c2e613981a138bab2362519c5c3952b0d318c157.zip |
Merged r16568 (#25634).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16571 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index cbb4ce8a7..e7fcadd03 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -1020,6 +1020,20 @@ EXPECTED assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') end + def test_syntax_highlight_by_coderay_alias + raw = <<-RAW +<pre><code class="ecma_script"> +alert("hello, world"); +</code></pre> +RAW + + expected = <<-EXPECTED +<pre><code class=\"ecma_script syntaxhl\"><span class=\"CodeRay\">alert(<span class=\"string\"><span class=\"delimiter\">"</span><span class=\"content\">hello, world</span><span class=\"delimiter\">"</span></span>);</span></code></pre> +EXPECTED + + assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') + end + def test_to_path_param assert_equal 'test1/test2', to_path_param('test1/test2') assert_equal 'test1/test2', to_path_param('/test1/test2/') |