mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-02-12 03:09:31 +00:00
Fix tests for pygments.rb 0.3.x
This commit is contained in:
@@ -271,7 +271,7 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
assert !blob("Binary/github.po").indexable?
|
assert !blob("Binary/github.po").indexable?
|
||||||
assert !blob("Binary/linguist.gem").indexable?
|
assert !blob("Binary/linguist.gem").indexable?
|
||||||
|
|
||||||
# large binary blobs should fail on size check first, not call
|
# large binary blobs should fail on size check first, not call
|
||||||
# into charlock_holmes and alloc big buffers for testing encoding
|
# into charlock_holmes and alloc big buffers for testing encoding
|
||||||
b = blob("Binary/octocat.ai")
|
b = blob("Binary/octocat.ai")
|
||||||
b.expects(:binary?).never
|
b.expects(:binary?).never
|
||||||
@@ -291,11 +291,10 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_colorize
|
def test_colorize
|
||||||
assert_equal <<-HTML, blob("Ruby/foo.rb").colorize
|
assert_equal <<-HTML.chomp, blob("Ruby/foo.rb").colorize
|
||||||
<div class="highlight"><pre><span class="k">module</span> <span class="nn">Foo</span>
|
<div class="highlight"><pre><span class="k">module</span> <span class="nn">Foo</span>
|
||||||
<span class="k">end</span>
|
<span class="k">end</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
</div>
|
|
||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -319,12 +319,11 @@ class TestLanguage < Test::Unit::TestCase
|
|||||||
|
|
||||||
|
|
||||||
def test_colorize
|
def test_colorize
|
||||||
assert_equal <<-HTML, Language['Ruby'].colorize("def foo\n 'foo'\nend\n")
|
assert_equal <<-HTML.chomp, Language['Ruby'].colorize("def foo\n 'foo'\nend\n")
|
||||||
<div class="highlight"><pre><span class="k">def</span> <span class="nf">foo</span>
|
<div class="highlight"><pre><span class="k">def</span> <span class="nf">foo</span>
|
||||||
<span class="s1">'foo'</span>
|
<span class="s1">'foo'</span>
|
||||||
<span class="k">end</span>
|
<span class="k">end</span>
|
||||||
</pre>
|
</pre></div>
|
||||||
</div>
|
|
||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user