1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

cleanup: rubocop: fix Layout/IndentHeredoc in test/unit/lib/redmine/syntax_highlighting/rouge_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18965 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-08 14:53:47 +00:00
parent 36373de2b9
commit 5da1580755
2 changed files with 16 additions and 17 deletions

View File

@ -157,7 +157,6 @@ Layout/IndentFirstHashElement:
# SupportedStyles: squiggly, active_support, powerpack, unindent
Layout/IndentHeredoc:
Exclude:
- 'test/unit/lib/redmine/syntax_highlighting/rouge_test.rb'
- 'test/unit/lib/redmine/unified_diff_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/macros_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'

View File

@ -33,22 +33,22 @@ class Redmine::SyntaxHighlighting::RougeTest < ActiveSupport::TestCase
end
def test_highlight_by_filename_should_distinguish_perl_and_prolog
raw_perl = <<'RAW_PERL'
#!/usr/bin/perl
print "Hello, world!\n";
RAW_PERL
expected_perl = <<'EXPECTED_PERL'
<span class="c1">#!/usr/bin/perl</span>
<span class="k">print</span> <span class="p">"</span><span class="s2">Hello, world!</span><span class="se">\n</span><span class="p">";</span>
EXPECTED_PERL
raw_prolog = <<'RAW_PROLOG'
#!/usr/bin/swipl
:- writeln('Hello, world!'),halt.
RAW_PROLOG
expected_prolog = <<'EXPECTED_PROLOG'
<span class="c1">#!/usr/bin/swipl</span>
<span class="p">:-</span> <span class="ss">writeln</span><span class="p">(</span><span class="ss">'Hello, world!'</span><span class="p">),</span><span class="ss">halt</span><span class="p">.</span>
EXPECTED_PROLOG
raw_perl = <<~'RAW_PERL'
#!/usr/bin/perl
print "Hello, world!\n";
RAW_PERL
expected_perl = <<~'EXPECTED_PERL'
<span class="c1">#!/usr/bin/perl</span>
<span class="k">print</span> <span class="p">"</span><span class="s2">Hello, world!</span><span class="se">\n</span><span class="p">";</span>
EXPECTED_PERL
raw_prolog = <<~'RAW_PROLOG'
#!/usr/bin/swipl
:- writeln('Hello, world!'),halt.
RAW_PROLOG
expected_prolog = <<~'EXPECTED_PROLOG'
<span class="c1">#!/usr/bin/swipl</span>
<span class="p">:-</span> <span class="ss">writeln</span><span class="p">(</span><span class="ss">'Hello, world!'</span><span class="p">),</span><span class="ss">halt</span><span class="p">.</span>
EXPECTED_PROLOG
filename = 'hello.pl'