mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Moving to fixtures
This commit is contained in:
@@ -447,14 +447,14 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Test language detection for files which shouldn't be used as samples
|
# Test language detection for files which shouldn't be used as samples
|
||||||
root = File.expand_path('../../test-files', __FILE__)
|
root = File.expand_path('../fixtures', __FILE__)
|
||||||
Dir.entries(root).each do |language|
|
Dir.entries(root).each do |language|
|
||||||
next if language == '.' || language == '..'
|
next unless File.file?(language)
|
||||||
|
|
||||||
# Each directory contains test files of a language
|
# Each directory contains test files of a language
|
||||||
dirname = File.join(root, language)
|
dirname = File.join(root, language)
|
||||||
Dir.entries(dirname).each do |filename|
|
Dir.entries(dirname).each do |filename|
|
||||||
next if filename == '.' || filename == '..'
|
next unless File.file?(filename)
|
||||||
|
|
||||||
# By default blob search the file in the samples;
|
# By default blob search the file in the samples;
|
||||||
# thus, we need to give it the absolute path
|
# thus, we need to give it the absolute path
|
||||||
|
|||||||
Reference in New Issue
Block a user