Skip to content

Commit

Permalink
devguide: clarify cargo test usage for modules
Browse files Browse the repository at this point in the history
The documentation was showing an invalid path for running single tests.
  • Loading branch information
jufajardini authored and victorjulien committed Mar 29, 2022
1 parent cfcade5 commit 69c6657
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/devguide/codebase/unittests-rust.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ From ``nfs > rpc_records.rs``:
Once that is done, Rust should recognize the new test. If you want to check a single test, run::

cargo test module::test_name
cargo test module::file_name::tests::test_name

or even::
Where ``tests`` refers to ``mod tests``. If you know the test name is unique, you can even run::

cargo test test_name

if you know it's a unique function name. Following the same idea, it is also possible to test specific modules or
submodules.
Following the same idea, it is also possible to test specific modules or submodules. For instance::

cargo test nfs::rpc_records

0 comments on commit 69c6657

Please sign in to comment.