]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
devguide: clarify cargo test usage for modules
authorJuliana Fajardini <jufajardini@gmail.com>
Wed, 22 Dec 2021 17:57:25 +0000 (17:57 +0000)
committerVictor Julien <vjulien@oisf.net>
Tue, 29 Mar 2022 05:56:03 +0000 (07:56 +0200)
The documentation was showing an invalid path for running single tests.

doc/devguide/codebase/unittests-rust.rst

index 4b196f25d77a5c2138c3fa4e48c11b51554f894b..c11d6e44e8acadf14819d43414ec7a52e5b1032c 100644 (file)
@@ -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