mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
add test of ls disambiguation
This commit is contained in:
@@ -122,4 +122,15 @@ class TestHeuristcs < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Candidate languages = ["LiveScript", "LoomScript"]
|
||||||
|
def test_ls_livescript_by_heuristics
|
||||||
|
results = Heuristics.disambiguate_ls(fixture("LiveScript/hello.ls"))
|
||||||
|
assert_equal Language["LiveScript"], results.first
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_ls_loomscript_by_heuristics
|
||||||
|
results = Heuristics.disambiguate_ls(fixture("LoomScript/HelloWorld.ls"))
|
||||||
|
assert_equal Language["LoomScript"], results.first
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user