Add script to alphabetise submodule list (#4054)

This commit is contained in:
John Gardner
2018-03-02 20:33:09 +11:00
committed by GitHub
parent 50d46eed38
commit 1b3cdda4f7
4 changed files with 785 additions and 729 deletions

View File

@@ -44,6 +44,11 @@ class TestPedantic < Minitest::Test
assert_sorted tests
end
def test_submodules_are_sorted
system(File.expand_path("../../script/sort-submodules", __FILE__) + " -t")
assert $?.success?
end
def assert_sorted(list)
list.each_cons(2) do |previous, item|
flunk "#{previous} should come after #{item}" if previous > item