test/dev-cmd/bottle_spec: fix --merge output matching

This commit is contained in:
Bo Anderson 2021-10-07 15:44:20 +01:00
parent 36a57aa738
commit c46fe273d4
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -105,14 +105,18 @@ describe "brew bottle" do
"#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json"
}.to output(<<~EOS).to_stdout
}.to output(Regexp.new(<<~'EOS')).to_stdout
==> testball
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f"
sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac"
end
\[master [0-9a-f]{4,40}\] testball: add 1\.0 bottle\.
1 file changed, 6 insertions\(\+\)
EOS
.and not_to_output.to_stderr
.and be_a_success
expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS
class Testball < Formula
@ -168,14 +172,18 @@ describe "brew bottle" do
"#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json"
}.to output(<<~EOS).to_stdout
}.to output(Regexp.new(<<~'EOS')).to_stdout
==> testball
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f"
sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac"
end
\[master [0-9a-f]{4,40}\] testball: update 1\.0 bottle\.
1 file changed, 3 insertions\(\+\), 3 deletions\(\-\)
EOS
.and not_to_output.to_stderr
.and be_a_success
expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS
class Testball < Formula
@ -230,7 +238,7 @@ describe "brew bottle" do
"#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json"
}.to output(<<~EOS).to_stdout
}.to output(Regexp.new(<<~'EOS')).to_stdout
==> testball
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
@ -238,7 +246,11 @@ describe "brew bottle" do
sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac"
sha256 cellar: :any, high_sierra: "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059"
end
\[master [0-9a-f]{4,40}\] testball: update 1\.0 bottle\.
1 file changed, 4 insertions\(\+\), 1 deletion\(\-\)
EOS
.and not_to_output.to_stderr
.and be_a_success
expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS
class Testball < Formula