0e0a294cfa87a8e44f29997cac48fd5030767b2b |
|
08-Aug-2016 |
Phil Carmody <phil@dovecot.fi> |
lib-test: improve expected error handling
If we expect a specific error string, then when we see it, suppress it.
We do not suppress errors expected by count, because if we get unexpected
errors, then we do not want them suppressed, and we have no way of
distinguishing between the expected and unexpected errors.
This of course favours the use of the expected string version of the helper,
but alas that's not always usable, as you can only expect one at a time.
Additionally, if we failed to see an expected message, then when we no longer
expect to see it, reset the expected message state to not cascade further
test assertion failures.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Conflicts:
src/lib-test/test-common.c |