macrotest icon indicating copy to clipboard operation
macrotest copied to clipboard

Feature Request: Expand fail

Open Emoun opened this issue 4 years ago • 2 comments

Hi,

I want to ask whether you would consider implementing what trybuild essentially does, I.e. allowing us to check that a compilation fails with a given error message?

The reason I ask is that I'm in need of the functionality that trybuild provides, however it is missing essential features that macrotest has. Most essential is the fact that it doesn't seem to panic upon wrong test results, which is a deal-breaker for me. Also, features that have been implemented in macrotest are also missing (#41,#43). Additionally, it seems silly to me that I would need to use two different crates for two functions that are so similar.

Essentially what I would need is expand_fail versions of expand and expand_without_refresh, that expects the expansion to fail and then checks the error message is as expected. If the expansion doesn't fail, or the error message is wrong, the test is a failure.

Emoun avatar Sep 29 '21 13:09 Emoun

The trybuild crate has just rejected a feature request that is essential for duplicate (dtolnay/trybuild#108), making it all the more useful if macrotest could provide a more fully featured alternative to trybuild.

Emoun avatar Oct 26 '21 08:10 Emoun

@Emoun, on it

eupn avatar Oct 31 '21 12:10 eupn