From cfeb2a833cfd12d842e8940b517f286b348d5288 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 9 Jul 2014 12:11:25 -0500 Subject: [PATCH] Checking all files for binary? --- test/test_blob.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_blob.rb b/test/test_blob.rb index aba82084..fc9e13c5 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -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?