Criterion
Criterion copied to clipboard
`cr_assert_std[out|err]_eq_str` doesn't show both values
If I were to write a failing test like:
Test(capturing_output, std_out, .init = redirect_all_stdout)
{
fprintf(stderr, "something");
cr_assert_stderr_eq_str("something else");
}
The I get the following output:
example ..........................***Failed 0.20 sec
[----] ../../../../src/testing/tests/example.c:44: Assertion Failed
[----]
[----] The file contents of __stderrp does not match the string "something else".
[----]
[FAIL] capturing_output::std_output_failure: (0.00s)
However, it would be much more helpful if it showed the output of stderr so I can see how it doesn't match.