Merge pull request #1863 from github/popular-integrity

Test that all popular languages exist
This commit is contained in:
Adam Roben
2014-12-11 12:31:08 -05:00
2 changed files with 10 additions and 1 deletions

View File

@@ -3,7 +3,6 @@
# This file should only be edited by GitHub staff
- ActionScript
- Bash
- C
- C#
- C++
@@ -27,3 +26,4 @@
- SQL
- Scala
- Scheme
- Shell

View File

@@ -375,4 +375,13 @@ class TestLanguage < Test::Unit::TestCase
message << missing.map { |language| sprintf("%-#{width}s %s", language.name, language.ace_mode) }.sort.join("\n")
assert missing.empty?, message
end
def test_all_popular_languages_exist
popular = YAML.load(File.read(File.expand_path("../../lib/linguist/popular.yml", __FILE__)))
missing = popular - Language.all.map(&:name)
message = "The following languages are listed in lib/linguist/popular.yml but not in lib/linguist/languages.yml.\n"
message << missing.sort.join("\n")
assert missing.empty?, message
end
end