-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: assert_stderr #22
Comments
This is not even a bats-assert issue... It works out of the box :
Merged is default, so it works by default. There is no $stderr by default (see below). So you must use separate. Separate Example:
The above code works. The key part your looking for is: "output=$stderr assert_output ..." Or make your own function in setup():
You must modify run with "--separate-stderr" anyways.
results in:
TL;DR; You should "output=$stderr assert_output ..." if your going to "--separate-stderr" anyways. This feature request is not a good idea. |
Thank you for the precision |
In bats-core documentation Writing tests, it is said that:
Unfortunately, bats-assert does not provide a method to test
$stderr
contents.Please consider a refactor of assert_output to allow for stderr contents testing.
The text was updated successfully, but these errors were encountered: