Crate for creating unit tests which write to/verify an output file?

I have some unit tests which generate an output file the first time they're run, then verify that the generated remains the same on subsequent runs. These are mostly tests for parsing and codegen functionality.

I remember encountering a crate dedicated to this test functionality some time ago, but I can't remember the name and haven't been able to find it since. Is anyone aware of such a crate?

Maybe this ?

It looks a bit abandoned though... :frowning:

Alternatively, I believe cbindgen does this a lot, so you could look into their code to get inspiration

Looks good, I'll give it a try. Thanks!

Searching for "golden", I also found goldentests, which I think may have been the crate I had seen previously, but it looks like it's only for running binaries/integration tests.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.