File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,18 @@ def test_colorize_code
114114 "def req(@a) end" => "#{ GREEN } def#{ CLEAR } #{ BLUE } #{ BOLD } req#{ CLEAR } (#{ RED } #{ REVERSE } @a#{ CLEAR } ) #{ GREEN } end#{ CLEAR } " ,
115115 } )
116116 else
117- tests . merge! ( {
118- "[1]]]\u0013 " => "[1]]]^S" ,
117+ if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '2.7.0' )
118+ tests . merge! ( {
119+ "[1]]]\u0013 " => "[#{ BLUE } #{ BOLD } 1#{ CLEAR } ]#{ RED } #{ REVERSE } ]#{ CLEAR } ]^S" ,
120+ "def req(true) end" => "#{ GREEN } def#{ CLEAR } #{ BLUE } #{ BOLD } req#{ CLEAR } (#{ RED } #{ REVERSE } true#{ CLEAR } ) end" ,
121+ } )
122+ else
123+ tests . merge! ( {
124+ "[1]]]\u0013 " => "[#{ BLUE } #{ BOLD } 1#{ CLEAR } ]]]^S" ,
125+ "def req(true) end" => "#{ GREEN } def#{ CLEAR } #{ BLUE } #{ BOLD } req#{ CLEAR } (#{ CYAN } #{ BOLD } true#{ CLEAR } ) end" ,
119126 } )
127+ end
120128 tests . merge! ( {
121- "def req(true) end" => "def req(true) end" ,
122129 "nil = 1" => "#{ CYAN } #{ BOLD } nil#{ CLEAR } = #{ BLUE } #{ BOLD } 1#{ CLEAR } " ,
123130 "alias $x $1" => "#{ GREEN } alias#{ CLEAR } #{ GREEN } #{ BOLD } $x#{ CLEAR } $1" ,
124131 "class bad; end" => "#{ GREEN } class#{ CLEAR } bad; #{ GREEN } end#{ CLEAR } " ,
You can’t perform that action at this time.
0 commit comments