Checking all files for binary?

This commit is contained in:
Arfon Smith
2014-07-09 12:11:25 -05:00
parent 8b4acf7023
commit cfeb2a833c

View File

@@ -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?