mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge branch 'master' into return-nil-on-no-ace-mode
This commit is contained in:
@@ -118,6 +118,14 @@ class TestHeuristcs < Test::Unit::TestCase
|
||||
})
|
||||
end
|
||||
|
||||
def test_fr_by_heuristics
|
||||
assert_heuristics({
|
||||
"Frege" => all_fixtures("Frege"),
|
||||
"Forth" => all_fixtures("Forth"),
|
||||
"text" => all_fixtures("text")
|
||||
})
|
||||
end
|
||||
|
||||
def assert_heuristics(hash)
|
||||
candidates = hash.keys.map { |l| Language[l] }
|
||||
|
||||
@@ -135,4 +143,11 @@ class TestHeuristcs < Test::Unit::TestCase
|
||||
"LoomScript" => "LoomScript/HelloWorld.ls"
|
||||
})
|
||||
end
|
||||
|
||||
def test_ts_by_heuristics
|
||||
assert_heuristics({
|
||||
"TypeScript" => all_fixtures("TypeScript", "*.ts"),
|
||||
"XML" => all_fixtures("XML", "*.ts")
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user