mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-24 02:07:33 +03:00
cargo-test: add page (#4268)
This commit is contained in:
parent
16bcab0104
commit
9931dfbd1e
28
pages/common/cargo-test.md
Normal file
28
pages/common/cargo-test.md
Normal file
@ -0,0 +1,28 @@
|
||||
# cargo-test
|
||||
|
||||
> Execute the unit and integration tests of a Rust package.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-test.html>.
|
||||
|
||||
- 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}}`
|
Loading…
Reference in New Issue
Block a user