mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-29 05:11:00 +00:00
Unit test for fix #1809 on heuristics
This commit is contained in:
@@ -20,6 +20,11 @@ class TestHeuristcs < Test::Unit::TestCase
|
|||||||
Dir.glob("#{samples_path}/#{language_name}/#{file}")
|
Dir.glob("#{samples_path}/#{language_name}/#{file}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_no_language
|
||||||
|
results = Heuristics.call(file_blob("C++/render_adapter.cpp"), [])
|
||||||
|
assert_equal [], results
|
||||||
|
end
|
||||||
|
|
||||||
# Candidate languages = ["C++", "Objective-C"]
|
# Candidate languages = ["C++", "Objective-C"]
|
||||||
def test_obj_c_by_heuristics
|
def test_obj_c_by_heuristics
|
||||||
# Only calling out '.h' filenames as these are the ones causing issues
|
# Only calling out '.h' filenames as these are the ones causing issues
|
||||||
|
|||||||
Reference in New Issue
Block a user