mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

The "upgrades with asking for user prompts with dependants checks" test for `cmd/upgrade` has been failing on CI. The regex in the test doesn't match expected output because the negative lookaheads aren't working as expected. The intention is to make sure that the names aren't repeated (i.e., second shouldn't match first, third shouldn't match first or second) but the negative lookaheads should be _inside_ the second/third capture group for this to work as intended. This updated regex should work as expected. I manually tested it using the output from CI to make sure that it matches when no formula names are repeated (e.g., `Formulae (3): testball, testball4, testball5`) and does not match if formula names are repeated (e.g., `Formulae (3): testball5, testball4, testball5`).