All tests adapted to pass

This commit is contained in:
lionellloh 2020-07-12 13:18:30 +08:00 committed by Lionell
parent 14d18a9731
commit 797a07d555
3 changed files with 5 additions and 5 deletions

View File

@ -337,7 +337,7 @@ module Homebrew
end
if non_standard_licenses.present?
problem "Formula #{formula.name} contains non standard SPDX license: #{non_standard_licenses} "
problem "Formula #{formula.name} contains non standard SPDX license: #{non_standard_licenses}."
end
return unless @online

View File

@ -2216,7 +2216,7 @@ class Formula
if args.nil?
return @licenses
else
@licenses = Array(args)
@licenses = Array(args) unless args == ""
puts @licenses
# license.
end

View File

@ -120,7 +120,7 @@ module Homebrew
RUBY
fa.audit_license
expect(fa.problems.first).to match "#{custom_spdx_id} is not a standard SPDX license."
expect(fa.problems.first).to match "Formula foo contains non standard SPDX license: [\"zzz\"]."
end
it "verifies that a license info is a standard spdx id" do
@ -160,8 +160,8 @@ module Homebrew
RUBY
fa.audit_license
expect(fa.problems.first).to match "License mismatch - GitHub license is: GPL-3.0, "\
"but Formulae license states: #{standard_mismatch_spdx_id}."
expect(fa.problems.first).to match "License mismatch - GitHub license is: [\"GPL-3.0\"], "\
"but Formulae license states: #{Array(standard_mismatch_spdx_id)}."
end
end