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 end
if non_standard_licenses.present? 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 end
return unless @online return unless @online

View File

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

View File

@ -120,7 +120,7 @@ module Homebrew
RUBY RUBY
fa.audit_license 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 end
it "verifies that a license info is a standard spdx id" do it "verifies that a license info is a standard spdx id" do
@ -160,8 +160,8 @@ module Homebrew
RUBY RUBY
fa.audit_license fa.audit_license
expect(fa.problems.first).to match "License mismatch - GitHub license is: GPL-3.0, "\ expect(fa.problems.first).to match "License mismatch - GitHub license is: [\"GPL-3.0\"], "\
"but Formulae license states: #{standard_mismatch_spdx_id}." "but Formulae license states: #{Array(standard_mismatch_spdx_id)}."
end end
end end