question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

With Non-[Default] channel, `cargo test` is broken when ‘Show stdout/stderr in tests.’

See original GitHub issue
rustup run nightly cargo test -- --nocapture

Fails with:

error: Unknown flag: '--nocapture'

Usage:
    cargo test [options] [--] [<args>...]

This also happens in the situation in the issue title.

Either this is a bug in Cargo or intellij-rust should not generate a broken command line.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
matkladcommented, Oct 3, 2017

That said, we probably should switch to +nightly syntax anyway, as it’s more readable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cargo test does not capture stdout/stderr in tokio::spawn async ...
Description. cargo test captures logs from stdout/stderr by using an undocumented function pair that internally manipulates the way print!
Read more >
What are ways to run Rust cargo test and have the test runner ...
cargo test -- --nocapture which tells Cargo to show output instead of hiding output; I'm interested in seeing output for successful tests, ...
Read more >
Running tests · rust-book-2rd-en - itfanr
You can change this default behavior by specifying command line options. Some command line options can be passed to cargo test , and...
Read more >
How Rust is tested
The Rust test suite covers rustc, std, cargo, rustdoc, and the Rust documentation, and features a number of special test harnesses to cover ......
Read more >
Running tests - The Rust Programming Language
For example, the default behavior of the binary produced by cargo test is to run all the tests in parallel and capture output...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found