<commit_before># frozen_string_literal: true

require 'spec_helper'

describe 'license fillable fields' do
  licenses.each do |license|
    context "The #{license['title']} license" do
      it 'should only contain supported fillable fields' do
        matches = license['content'][0, 1000].scan(/\[([a-z]+)\]/)
        extra_fields = matches.flatten - (fields.map { |f| f['name'] })
        expect(extra_fields).to be_empty
      end
    end
  end
end
<commit_msg>match _ fields, require preceding space (ex CECILL-2.1)<commit_after># frozen_string_literal: true

require 'spec_helper'

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

{'fraction_non_alphanumeric': 0.1362704918032787, 'fraction_numerical': 0.012295081967213115, 'mean_word_length': 3.381165919282511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4710368', 'n_tokens_mistral': 315, 'n_tokens_neox': 303, 'n_words': 86}