From 24eb1d3fe2539a139545f13c9bb01b4a008c1711 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 9 Jan 2015 11:43:34 -0600 Subject: [PATCH] Updating file regex to support unlicense.txt --- test/test_grammars.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index f010b79b..188bc187 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -60,7 +60,7 @@ class TestGrammars < Minitest::Test def test_submodules_have_licenses categories = submodule_paths.group_by do |submodule| files = Dir[File.join(ROOT, submodule, "*")] - license = files.find { |path| File.basename(path) =~ /\blicen[cs]e\b/i } || files.find { |path| File.basename(path) =~ /\bcopying\b/i } + license = files.find { |path| File.basename(path) =~ /\b(un)?licen[cs]e\b/i } || files.find { |path| File.basename(path) =~ /\bcopying\b/i } if license.nil? if readme = files.find { |path| File.basename(path) =~ /\Areadme\b/i } license = readme if File.read(readme) =~ /\blicen[cs]e\b/i