Rust CLI Build, Run, Test, and Lint/Show println output in tests

Pass test harness flags after `--`.

Section: Tests and benches

Show println output in tests

bash
bash
cargo test -- --nocapture
Explanation

The flags after the separator go to the test harness, not Cargo.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Tests and benches
Run the test suite
Build and run tests for the local package.
OpenIn sheetbashsame section
Run a matching subset of tests
Filter tests by substring.
OpenIn sheetbashsame section
Run tests serially
Force one test thread.
OpenIn sheetbashsame section
Run benchmarks
Execute benchmark targets if configured.
OpenIn sheetbashsame section
Build tests without running them
Compile test artifacts only.
OpenIn sheetbash2 tag match
Type-check without producing binaries
Validate code quickly without final artifacts.
OpenIn sheetbash1 tag match