#[test(should_fail_with = "message")] will now check that "message" is a substring of the failure reason. I think this is a backwards-compatible change.
I thought about supporting regular expressions, as suggested in the related issue, but I didn't know how to signal that it's a regex or just "contains". I guess that could be done with another name, something like should_with_with_regexp 🤔 (in a separate PR, if really needed/wanted)
Additional Context
None
Documentation
Check one:
[ ] No documentation needed.
[x] Documentation included in this PR.
[ ] [For Experimental Features] Documentation to be submitted in a separate PR.
PR Checklist*
[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.
Description
Problem
Resolves #4786
Summary
#[test(should_fail_with = "message")]
will now check that "message" is a substring of the failure reason. I think this is a backwards-compatible change.I thought about supporting regular expressions, as suggested in the related issue, but I didn't know how to signal that it's a regex or just "contains". I guess that could be done with another name, something like
should_with_with_regexp
🤔 (in a separate PR, if really needed/wanted)Additional Context
None
Documentation
Check one:
PR Checklist*
cargo fmt
on default settings.