From: Juliana Fajardini Date: Wed, 22 Dec 2021 17:57:25 +0000 (+0000) Subject: devguide: clarify cargo test usage for modules X-Git-Tag: suricata-7.0.0-beta1~798 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69c6657127546cf1b8a02751ae328421c8f366f8;p=thirdparty%2Fsuricata.git devguide: clarify cargo test usage for modules The documentation was showing an invalid path for running single tests. --- diff --git a/doc/devguide/codebase/unittests-rust.rst b/doc/devguide/codebase/unittests-rust.rst index 4b196f25d7..c11d6e44e8 100644 --- a/doc/devguide/codebase/unittests-rust.rst +++ b/doc/devguide/codebase/unittests-rust.rst @@ -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