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:
Lars Brinkhoff
2013-08-24 14:24:53 +02:00
parent 9f103abfb5
commit 2d940e72c2
6 changed files with 342 additions and 0 deletions

View File

@@ -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