mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge branch 'master' into 1233-local
Conflicts: lib/linguist/language.rb lib/linguist/samples.json
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?
|
||||
@@ -185,9 +192,9 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert !blob("Text/README").generated?
|
||||
|
||||
# Xcode project files
|
||||
assert blob("XML/MainMenu.xib").generated?
|
||||
assert !blob("XML/MainMenu.xib").generated?
|
||||
assert blob("Binary/MainMenu.nib").generated?
|
||||
assert blob("XML/project.pbxproj").generated?
|
||||
assert !blob("XML/project.pbxproj").generated?
|
||||
|
||||
# Gemfile.locks
|
||||
assert blob("Gemfile.lock").generated?
|
||||
@@ -247,6 +254,13 @@ class TestBlob < Test::Unit::TestCase
|
||||
# Generated VCR
|
||||
assert blob("YAML/vcr_cassette.yml").generated?
|
||||
|
||||
# Generated by Zephir
|
||||
assert blob("Zephir/filenames/exception.zep.c").generated?
|
||||
assert blob("Zephir/filenames/exception.zep.h").generated?
|
||||
assert blob("Zephir/filenames/exception.zep.php").generated?
|
||||
assert !blob("Zephir/Router.zep").generated?
|
||||
|
||||
|
||||
assert Linguist::Generated.generated?("node_modules/grunt/lib/grunt.js", nil)
|
||||
end
|
||||
|
||||
@@ -271,6 +285,10 @@ class TestBlob < Test::Unit::TestCase
|
||||
# 'thirdparty' directory
|
||||
assert blob("thirdparty/lib/main.c").vendored?
|
||||
|
||||
# 'extern(al)' directory
|
||||
assert blob("extern/util/__init__.py").vendored?
|
||||
assert blob("external/jquery.min.js").vendored?
|
||||
|
||||
# C deps
|
||||
assert blob("deps/http_parser/http_parser.c").vendored?
|
||||
assert blob("deps/v8/src/v8.h").vendored?
|
||||
@@ -374,7 +392,17 @@ class TestBlob < Test::Unit::TestCase
|
||||
|
||||
# NuGet Packages
|
||||
assert blob("packages/Modernizr.2.0.6/Content/Scripts/modernizr-2.0.6-development-only.js").vendored?
|
||||
|
||||
|
||||
# Font Awesome
|
||||
assert blob("some/asset/path/font-awesome.min.css").vendored?
|
||||
assert blob("some/asset/path/font-awesome.css").vendored?
|
||||
|
||||
# Normalize
|
||||
assert blob("some/asset/path/normalize.css").vendored?
|
||||
|
||||
# Cocoapods
|
||||
assert blob('Pods/blah').vendored?
|
||||
|
||||
# Html5shiv
|
||||
assert blob("Scripts/html5shiv.js").vendored?
|
||||
assert blob("Scripts/html5shiv.min.js").vendored?
|
||||
@@ -389,6 +417,11 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert blob("cordova-2.1.0.js").vendored?
|
||||
assert blob("cordova-2.1.0.min.js").vendored?
|
||||
|
||||
# Foundation js
|
||||
assert blob("foundation.js").vendored?
|
||||
assert blob("foundation.min.js").vendored?
|
||||
assert blob("foundation.abide.js").vendored?
|
||||
|
||||
# Vagrant
|
||||
assert blob("Vagrantfile").vendored?
|
||||
|
||||
@@ -399,6 +432,11 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert blob("subproject/gradlew").vendored?
|
||||
assert blob("subproject/gradlew.bat").vendored?
|
||||
assert blob("subproject/gradle/wrapper/gradle-wrapper.properties").vendored?
|
||||
|
||||
# Octicons
|
||||
assert blob("octicons.css").vendored?
|
||||
assert blob("public/octicons.min.css").vendored?
|
||||
assert blob("public/octicons/sprockets-octicons.scss").vendored?
|
||||
end
|
||||
|
||||
def test_language
|
||||
|
||||
Reference in New Issue
Block a user