mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add Blob#loc and Blob#sloc
This commit is contained in:
		| @@ -51,10 +51,22 @@ class TestBlob < Test::Unit::TestCase | ||||
|     assert_equal "module Foo\nend\n", blob("foo.rb").data | ||||
|   end | ||||
|  | ||||
|   def test_lines | ||||
|     assert_equal ["module Foo", "end", ""], blob("foo.rb").lines | ||||
|   end | ||||
|  | ||||
|   def test_size | ||||
|     assert_equal 15, blob("foo.rb").size | ||||
|   end | ||||
|  | ||||
|   def test_loc | ||||
|     assert_equal 3, blob("foo.rb").loc | ||||
|   end | ||||
|  | ||||
|   def test_sloc | ||||
|     assert_equal 2, blob("foo.rb").sloc | ||||
|   end | ||||
|  | ||||
|   def test_binary | ||||
|     assert blob("linguist.gem").binary? | ||||
|     assert blob("git.deb").binary? | ||||
|   | ||||
		Reference in New Issue
	
	Block a user