Merge pull request #19120 from in0rdr/feat/document-stderr-redirect

Document stderr redirection for shell_output tests
This commit is contained in:
Mike McQuaid 2025-01-19 20:50:33 +00:00 committed by GitHub
commit 55f399c10d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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/...`.