I built a quick and dirty solution to a problem I was facing in large code bases. Namely running specific tests. I am curious if others find this useful.
cargo-tst is a tiny exstension to
cargo which allows you to search for a test and then run it. The goal is to avoid having to match the name precisely with
cargo test my_exact_test_name.
Let me know if you would find this useful. If there is interest I will polish and publish this to crates.io.
The name is not great, I will try to come up with something better.
cargo install --git https://github.com/jmintb/cargo-tst.git
- cd into the project and type
cargo tst search_termwhere
search_termis the term used to match against test names.
- The five closest matching names will be presented and you can select which one to run.
- After selecting a test
en run without a search term to rerun the same test. The last run test is project specific so there is no overlap when switching projects.
Note code review might not be the correct category. I am looking to gauge interest in using the project. Please don't look at the code it was written rather hastily this morning haha