mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Illustrator files should be binary
This commit is contained in:
@@ -87,6 +87,9 @@ application/octet-stream:
|
||||
- ucode
|
||||
- xpi
|
||||
|
||||
application/postscript:
|
||||
binary: true
|
||||
|
||||
application/java-archive:
|
||||
binary: true
|
||||
extensions:
|
||||
|
||||
4424
test/fixtures/blob/octocat.ai
vendored
Normal file
4424
test/fixtures/blob/octocat.ai
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -23,10 +23,11 @@ class TestBlob < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_mime_type
|
||||
assert_equal "application/ruby", blob("grit.rb").mime_type
|
||||
assert_equal "application/xml", blob("bar.xml").mime_type
|
||||
assert_equal "application/octet-stream", blob("dog.o").mime_type
|
||||
assert_equal "application/postscript", blob("octocat.ai").mime_type
|
||||
assert_equal "application/ruby", blob("grit.rb").mime_type
|
||||
assert_equal "application/sh", blob("script.sh").mime_type
|
||||
assert_equal "application/xml", blob("bar.xml").mime_type
|
||||
assert_equal "text/plain", blob("README").mime_type
|
||||
end
|
||||
|
||||
@@ -45,9 +46,10 @@ class TestBlob < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_disposition
|
||||
assert_equal "attachment; filename=foo+bar.jar", blob("foo bar.jar").disposition
|
||||
assert_equal "attachment; filename=foo.bin", blob("foo.bin").disposition
|
||||
assert_equal "attachment; filename=linguist.gem", blob("pkg/linguist.gem").disposition
|
||||
assert_equal "attachment; filename=foo+bar.jar", blob("foo bar.jar").disposition
|
||||
assert_equal "attachment; filename=octocat.ai", blob("octocat.ai").disposition
|
||||
assert_equal "inline", blob("README").disposition
|
||||
assert_equal "inline", blob("foo.txt").disposition
|
||||
assert_equal "inline", blob("grit.rb").disposition
|
||||
@@ -75,9 +77,10 @@ class TestBlob < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_binary
|
||||
assert blob("linguist.gem").binary?
|
||||
assert blob("git.deb").binary?
|
||||
assert blob("git.exe").binary?
|
||||
assert blob("linguist.gem").binary?
|
||||
assert blob("octocat.ai").binary?
|
||||
assert blob("octocat.png").binary?
|
||||
assert !blob("README").binary?
|
||||
assert !blob("file.txt").binary?
|
||||
@@ -97,6 +100,7 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert blob("octocat.jpg").image?
|
||||
assert blob("octocat.jpeg").image?
|
||||
assert blob("octocat.gif").image?
|
||||
assert !blob("octocat.ai").image?
|
||||
assert !blob("octocat.psd").image?
|
||||
end
|
||||
|
||||
@@ -105,6 +109,7 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert blob("foo.rb").viewable?
|
||||
assert blob("script.pl").viewable?
|
||||
assert !blob("linguist.gem").viewable?
|
||||
assert !blob("octocat.ai").viewable?
|
||||
assert !blob("octocat.png").viewable?
|
||||
end
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ class TestMime < Test::Unit::TestCase
|
||||
|
||||
assert_equal 'video/quicktime', Mime.mime_for(".mov")
|
||||
|
||||
assert_equal 'application/postscript', Mime.mime_for(".ai")
|
||||
assert_equal 'application/postscript', Mime.mime_for(".eps")
|
||||
assert_equal 'application/postscript', Mime.mime_for(".ps")
|
||||
|
||||
assert_equal 'application/octet-stream', Mime.mime_for(".dmg")
|
||||
assert_equal 'application/octet-stream', Mime.mime_for(".exe")
|
||||
assert_equal 'application/octet-stream', Mime.mime_for(".dll")
|
||||
@@ -47,6 +51,7 @@ class TestMime < Test::Unit::TestCase
|
||||
assert Mime.binary?("application/java-archive")
|
||||
assert Mime.binary?("application/ogg")
|
||||
assert Mime.binary?("application/pdf")
|
||||
assert Mime.binary?("application/postscript")
|
||||
assert Mime.binary?("application/x-gzip")
|
||||
assert Mime.binary?("application/x-shockwave-flash")
|
||||
assert Mime.binary?("application/zip")
|
||||
@@ -116,7 +121,6 @@ class TestMime < Test::Unit::TestCase
|
||||
assert !Mime.binary?(".ms")
|
||||
assert !Mime.binary?(".nc")
|
||||
assert !Mime.binary?(".pl")
|
||||
assert !Mime.binary?(".ps")
|
||||
assert !Mime.binary?(".py")
|
||||
assert !Mime.binary?(".rb")
|
||||
assert !Mime.binary?(".sh")
|
||||
|
||||
Reference in New Issue
Block a user