test/os/mac/pkgconfig_spec: fix test failures

This fixes the test failures induced by 845299d10e95e48e4b408ce5fef93036a9b4bf0a.
This commit is contained in:
carlocab 2020-12-24 08:27:05 +00:00
parent 5835cce360
commit a701ef79d1
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -15,7 +15,7 @@
# For indeterminable cases, consult https://opensource.apple.com for the version used. # For indeterminable cases, consult https://opensource.apple.com for the version used.
describe "pkg-config" do describe "pkg-config" do
def pc_version(library) def pc_version(library)
path = HOMEBREW_LIBRARY_PATH/"os/mac/pkgconfig/#{MacOS.sdk_version}/#{library}.pc" path = HOMEBREW_LIBRARY_PATH/"os/mac/pkgconfig/#{MacOS.version}/#{library}.pc"
version = File.foreach(path) version = File.foreach(path)
.lazy .lazy
.grep(/^Version:\s*?(.+)$/) { Regexp.last_match(1) } .grep(/^Version:\s*?(.+)$/) { Regexp.last_match(1) }