Skip to content

Commit

Permalink
Merge pull request #19120 from in0rdr/feat/document-stderr-redirect
Browse files Browse the repository at this point in the history
Document stderr redirection for shell_output tests
  • Loading branch information
MikeMcQuaid authored Jan 19, 2025
2 parents fd0c851 + 8fa2119 commit 55f399c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/Formula-Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ test do
end
```

* If the binary only writes to `stderr`, you can redirect `stderr` to `stdout` for assertions with `shell_output`. For example:

```ruby
test do
assert_match "Output on stderr", shell_output("#{bin}/formula-program 2>&1", 2)
end
```

### Manuals

Homebrew expects to find manual pages in `#{prefix}/share/man/...`, and not in `#{prefix}/man/...`.
Expand Down

0 comments on commit 55f399c

Please sign in to comment.