mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Removing second ts from languages.yml, but adding to test code for heuristics
This commit is contained in:
@@ -1791,7 +1791,6 @@ XML:
|
||||
- .tmSnippet
|
||||
- .tmTheme
|
||||
- .tml
|
||||
- .ts
|
||||
- .ui
|
||||
- .urdf
|
||||
- .vxml
|
||||
|
||||
@@ -50,4 +50,16 @@ class TestHeuristcs < Test::Unit::TestCase
|
||||
results = Heuristics.disambiguate_pl(fixture("Perl/perl-test.t"), languages)
|
||||
assert_equal Language["Perl"], results.first
|
||||
end
|
||||
|
||||
def test_ts_typescript_by_heuristics
|
||||
languages = ["TypeScript", "XML"]
|
||||
results = Heuristics.disambiguate_pl(fixture("TypeScript/class.ts"), languages)
|
||||
assert_equal Language["TypeScript"], results.first
|
||||
end
|
||||
|
||||
def test_ts_xml_by_heuristics
|
||||
languages = ["TypeScript", "XML"]
|
||||
results = Heuristics.disambiguate_pl(fixture("XML/pt_BR.ts"), languages)
|
||||
assert_equal Language["XML"], results.first
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user