mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add F# and GLSL samples. Add Forth and GLSL extension .fs.
Add heuristic to disambiguate between F#, Forth, and GLSL.
This commit is contained in:
@@ -127,4 +127,14 @@ class TestHeuristcs < Test::Unit::TestCase
|
||||
results = Heuristics.disambiguate_sc(fixture("Scala/node11.sc"))
|
||||
assert_equal Language["Scala"], results.first
|
||||
end
|
||||
|
||||
def test_fs_by_heuristics
|
||||
languages = ["F#", "Forth", "GLSL"]
|
||||
languages.each do |language|
|
||||
all_fixtures(language).each do |fixture|
|
||||
results = Heuristics.disambiguate_fs(fixture("#{language}/#{File.basename(fixture)}"))
|
||||
assert_equal Language[language], results.first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user