From c46fe273d4100379c4d5652a4d88abac55421bbf Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Thu, 7 Oct 2021 15:44:20 +0100 Subject: [PATCH] test/dev-cmd/bottle_spec: fix --merge output matching --- Library/Homebrew/test/dev-cmd/bottle_spec.rb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index 114eba3192..fff72d116b 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -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