From 9931dfbd1ecf4bb5b86c04c0b463ea2a18108b68 Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Sun, 30 Aug 2020 01:00:03 -0300 Subject: [PATCH] cargo-test: add page (#4268) --- pages/common/cargo-test.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/cargo-test.md diff --git a/pages/common/cargo-test.md b/pages/common/cargo-test.md new file mode 100644 index 000000000..e04cd7c45 --- /dev/null +++ b/pages/common/cargo-test.md @@ -0,0 +1,28 @@ +# cargo-test + +> Execute the unit and integration tests of a Rust package. +> More information: . + +- Only run tests containing a specific string in their names: + +`cargo test {{testname}}` + +- Set the number of simultaneous running test cases: + +`cargo test -- --test-threads={{count}}` + +- Require that `Cargo.lock` is up to date: + +`cargo test --locked` + +- Test artifacts in release mode, with optimizations: + +`cargo test --release` + +- Test all packages in the workspace: + +`cargo test --workspace` + +- Run tests for a package: + +`cargo test --package {{package}}`