mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Checking all files for binary?
This commit is contained in:
@@ -140,6 +140,13 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert !blob("Perl/script.pl").binary?
|
||||
end
|
||||
|
||||
def test_all_binary
|
||||
Samples.each do |sample|
|
||||
blob = blob(sample[:path])
|
||||
assert ! (blob.likely_binary? || blob.binary?), "#{sample[:path]} is a binary file"
|
||||
end
|
||||
end
|
||||
|
||||
def test_text
|
||||
assert blob("Text/README").text?
|
||||
assert blob("Text/dump.sql").text?
|
||||
|
||||
Reference in New Issue
Block a user