rust icon indicating copy to clipboard operation
rust copied to clipboard

Improve "Walkthrough: adding a new test" with test and stderr file workflow

Open hardikxk opened this issue 3 weeks ago • 1 comments

Location (URL)

https://rustc-dev-guide.rust-lang.org/walkthroughs/test.html

Summary

The existing Walkthrough for adding a new test for the compiler does not mention about the .stderr files at all and whether they need to be committed.

The documentation should explicitly mention about the .stderr files and how if in case one is generated it needs to be added to your commit.

The current documentation can be improved by mentioning details about the .stderr files and why they are important. Another alternative would be to entirely change the example used in the walkthrough as that specific test doesn't produce any .stderr file and hence would not be a very great example for a walkthrough about adding tests.

A better documented example of this while not being as verbose as the reference docs is the clippy docs and while yes this is not exactly a walkthrough but if we are going to keep a walkthrough it should be the one that covers all cases of the testing workflow.

This is from a conversation at zulip.

I'd like to work on this!

hardikxk avatar Nov 13 '26 10:11 hardikxk

@rustbot claim

hardikxk avatar Nov 13 '26 10:11 hardikxk