mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-06 14:56:51 +00:00
Update cheatsheets
This commit is contained in:
33
cargo-test
Normal file
33
cargo-test
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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}}`
|
||||
|
||||
- Test artifacts in release mode, with optimizations:
|
||||
|
||||
`cargo test --release`
|
||||
|
||||
- Test all packages in the workspace:
|
||||
|
||||
`cargo test --workspace`
|
||||
|
||||
- Run tests for a specific package:
|
||||
|
||||
`cargo test --package {{package}}`
|
||||
|
||||
- Run tests without hiding output from test executions:
|
||||
|
||||
`cargo test -- --nocapture`
|
||||
Reference in New Issue
Block a user