19 Commits

Author SHA1 Message Date
Mike McQuaid
aa81982aba
brew style --fix 2020-06-02 09:49:23 +01:00
Mike McQuaid
c91f397605
cli: fix options handling.
Fix breaking options on taps again (second time in two weeks, sob).

To avoid doing this again: also add a test for this case (that I've
verified would have caught these cases).
2020-05-07 10:33:02 +01:00
Mike McQuaid
eb0be5f6fe
test: re-enable portable Ruby tests.
Let's try to get these working again.
2019-11-06 15:36:28 +00:00
Mike McQuaid
2d51b8189b
test: disable some tests on Linux portable ruby. 2019-10-10 16:17:06 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
2f1c6e9ca5
Cleanup cmd/* tests
- Test `_args` methods
- Remove multiple integration tests (except where essential
  e.g. `install`, `help`)
2019-03-28 08:35:36 +00:00
Mike McQuaid
49d3849507
cmd/install_spec: test new invalid option behaviour. 2019-01-29 10:48:39 +00:00
Markus Reiter
7762ce32aa Use more descriptive heredoc names. 2018-07-11 18:15:30 +02:00
Mike McQuaid
054866653d
Merge pull request #4185 from sjackman/superenv-linux
Add superenv for Linux
2018-05-31 19:56:16 +01:00
Mike McQuaid
f6bf989378 Remove some integration tests
We have an awful lot of integration tests and they are (comparatively)
really slow. Let's kill those that test edge case conditions and focus
on those that test that our functionality works as expected. Edge cases
can be better tested with unit tests.
2018-05-23 14:41:31 +01:00
Shaun Jackman
434e8d8e2f test/cmd/install: Fix a test failure on Linux
Fix the error:
Error: Homebrew GCC requested, but formula gcc not found!
2018-05-22 10:48:17 -07:00
Bob W. Hogg
3cd869651b Add test fixtures for ELF executables
Add test/support/fixtures/elf/
and test/support/fixtures/tarballs/testball-0.1-linux.tbz
2017-11-26 08:37:57 -08:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Mike McQuaid
ef59a751f4 Improve some brew install messaging.
Improve the messaging around `brew install` when there's a possible user
action such as an `upgrade` or `link` and don't tell people to
`install --force` when it's unnecessary.

While I did this, tweak the output and function usage in a couple of
related places.

Some example output before this change:
```
Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: mysql@5.6 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: analog-6.0_1 already installed
Warning: bash-completion@2-2.5 already installed, it's just not linked.
```

Some example output after this change:
```
Error: openssl 1.0.2k is already installed
To upgrade to 1.0.2l, run `brew upgrade openssl`
Warning: mysql@5.6 5.6.36_1 is already installed
Warning: analog 6.0_1 is already installed
Warning: bash-completion@2 2.5 is already installed, it's just not linked.
You can use `brew link bash-completion@2` to link this version.
```
2017-05-27 10:15:37 +01:00
Mike McQuaid
18c2713df4 formula_installer: improve install/upgrade message
If you `brew install` a formula that's already installed you get:
  Warning: ripgrep-0.5.1 already installed

If you `brew install` an outdated formula that's installed you get:
  Error: ripgrep-0.5.1 already installed. To install this version, first
  `brew unlink ripgrep`

Instead, suggest that the user should `brew upgrade` in this case. If
the formula isn't outdated use the previous message.
2017-04-25 12:45:39 +01:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Markus Reiter
ec0f2187a2 Avoid warnings when HOMEBREW_PREFIX/bin is not in PATH. 2017-02-25 09:08:05 +01:00
Markus Reiter
a2b4ee1ecd Convert brew install test to spec. 2017-02-25 09:01:40 +01:00