correcting regex to match in any order and only once

This commit is contained in:
thibhero 2025-03-06 23:54:19 -05:00
parent 640556df39
commit 692174305d

View File

@ -54,8 +54,7 @@ RSpec.describe Homebrew::Cmd::UpgradeCmd do
expect do expect do
brew "upgrade", "--ask" brew "upgrade", "--ask"
end.to output(/.*Formulae\s*\(3\):\s*(?:testball|testball5|testball4)\s*,?\s*(?:testball|testball5|testball4)\s*,? end.to output(/Formulae\s*\(3\):\s*(testball|testball5|testball4)\s*,\s*(?!(\1))(testball|testball5|testball4)\s*,\s*(?!(\1|\3))(testball|testball5|testball4)/)
\s*(?:testball|testball5|testball4).*/)
.to_stdout.and not_to_output.to_stderr .to_stdout.and not_to_output.to_stderr
expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory