1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-21 20:30:10 +01:00

match _ fields, require preceding space (ex CECILL-2.1)

This commit is contained in:
Mike Linksvayer 2018-01-02 14:35:04 -08:00
parent d7bf3ac98a
commit 316bd0b828

View File

@ -6,7 +6,7 @@ describe 'license fillable fields' do
licenses.each do |license| licenses.each do |license|
context "The #{license['title']} license" do context "The #{license['title']} license" do
it 'should only contain supported fillable fields' do it 'should only contain supported fillable fields' do
matches = license['content'][0, 1000].scan(/\[([a-z]+)\]/) matches = license['content'][1, 1000].scan(/\s+\[([a-z_]+)\]/)
extra_fields = matches.flatten - (fields.map { |f| f['name'] }) extra_fields = matches.flatten - (fields.map { |f| f['name'] })
expect(extra_fields).to be_empty expect(extra_fields).to be_empty
end end