34 Commits

Author SHA1 Message Date
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
Bo Anderson
af234779af
test: support non-master init.defaultbranch 2022-10-07 18:44:03 +01:00
Lukas Oberhuber
2c829380b5 Test that --debug-symbols succeeds
Due to limitations of the test framework, this only tests
that the command with the --debug-symbols
flag succeeds and that on MacOS the `dsymutil` is run.
2022-08-11 10:54:18 -10:00
Lukas Oberhuber
aa2682a098 These tests don't test anything
On MacOS, the compile flags `-g` are not set, and I can't figure out
how to set them here. `dsymutil` runs successfully regardless of if
there are debug symbols or not.
Same on linux therefore the test cannot succeed.
2022-08-10 16:55:19 -10:00
Lukas Oberhuber
19a66e75c4 Second try at objdump call for linux 2022-08-06 10:06:32 -07:00
Lukas Oberhuber
f930dd58a0 Fix style 2022-08-05 17:02:10 -07:00
Lukas Oberhuber
683bcd92b0 Attempted linux test 2022-08-05 16:54:32 -07:00
Lukas Oberhuber
89c1d6812d Test sources are dropped in HOMEBREW_CACHE/Sources 2022-08-02 09:06:28 -07:00
Lukas Oberhuber
fdf17f06b1 Test for dSYM directory on Mac 2022-08-01 16:30:00 -07:00
Lukas Oberhuber
bee3531090 Improve style 2022-08-01 15:25:34 -07:00
Lukas Oberhuber
15f1ac8775 Integration test for --debug-symbols
But only checks that the command works. Not that `dsymutil` is called
or that `-g` is added to the compile args.

(Not sure how to do either in an integration test.)
2022-07-30 11:23:40 +01:00
Rylan Polster
4a82d807e1
style: remove RSpec/MultipleDescribes violations in commands 2021-02-01 20:30:51 -05:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
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