mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Test for Hack heuristic
This commit is contained in:
@@ -105,6 +105,12 @@ class TestHeuristcs < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_hack_by_heuristics
|
||||
languages = ["Hack", "PHP"]
|
||||
results = Heuristics.disambiguate_hack(fixture("Hack/funs.php"), languages)
|
||||
assert_equal Language["Hack"], results.first
|
||||
end
|
||||
|
||||
def test_sc_supercollider_by_heuristics
|
||||
languages = ["Scala", "SuperCollider"]
|
||||
results = Heuristics.disambiguate_sc(fixture("SuperCollider/WarpPreset.sc"), languages)
|
||||
|
||||
Reference in New Issue
Block a user