test/functional/examples.rb in coderay-1.0.9 vs test/functional/examples.rb in coderay-1.1.0.rc1
- old
+ new
@@ -20,11 +20,11 @@
puts 'Hello, world!'
end
CODE
assert_equal <<-DIV, div
<table class="CodeRay"><tr>
- <td class="line-numbers" title="double click to toggle" ondblclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre><a href="#n1" name="n1">1</a>
+ <td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
</pre></td>
<td class="code"><pre><span style="color:#00D">5</span>.times <span style="color:#080;font-weight:bold">do</span>
puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">'</span><span style="color:#D20">Hello, world!</span><span style="color:#710">'</span></span>
@@ -36,11 +36,11 @@
page = CodeRay.scan('puts "Hello, world!"', :ruby).page
assert_match <<-PAGE, page
<body>
<table class="CodeRay"><tr>
- <td class="line-numbers" title="double click to toggle" ondblclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre>
+ <td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
</pre></td>
<td class="code"><pre>puts <span class="string"><span class="delimiter">"</span><span class="content">Hello, world!</span><span class="delimiter">"</span></span></pre></td>
</tr></table>
</body>
@@ -112,10 +112,10 @@
assert_equal ["import", :keyword, " ", :space, "this", :include,
";", :operator, " ", :space, "# The Zen of Python", :comment], tokens
# format the tokens
term = terminal_encoder.encode_tokens(tokens)
- assert_equal "\e[1;31mimport\e[0m \e[33mthis\e[0m; \e[37m# The Zen of Python\e[0m", term
+ assert_equal "\e[32mimport\e[0m \e[31mthis\e[0m; \e[1;30m# The Zen of Python\e[0m", term
# re-using scanner and encoder
ruby_highlighter = CodeRay::Duo[:ruby, :div]
div = ruby_highlighter.encode('puts "Hello, world!"')
assert_equal <<-DIV, div