From 4c8ba874e2788d2a6ff0bd949f6081067fe9be0b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 14 Aug 2025 16:22:41 -0500 Subject: [PATCH 1/2] fix(lexarg): Organize help output --- crates/libtest-lexarg/src/lib.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/libtest-lexarg/src/lib.rs b/crates/libtest-lexarg/src/lib.rs index 7d1b782..ed95ae1 100644 --- a/crates/libtest-lexarg/src/lib.rs +++ b/crates/libtest-lexarg/src/lib.rs @@ -100,21 +100,19 @@ pub const UNSTABLE_OPTIONS: &str = "unstable-options"; pub const OPTIONS_HELP: &str = r#" Options: - --include-ignored - Run ignored and not ignored tests - --ignored Run only ignored tests + --skip FILTER Skip tests whose names contain FILTER (this flag can + be used multiple times) + --exact Exactly match filters rather than by substring --test Run tests and not benchmarks --bench Run benchmarks instead of tests - --list List all tests and benchmarks + --ignored Run only ignored tests + --include-ignored + Run ignored and not ignored tests --nocapture don't capture stdout/stderr of each task, allow printing directly + --show-output Show captured stdout of successful tests --test-threads n_threads Number of threads used for running tests in parallel - --skip FILTER Skip tests whose names contain FILTER (this flag can - be used multiple times) - -q, --quiet Display one character per test instead of one line. - Alias to --format=terse - --exact Exactly match filters rather than by substring --color auto|always|never Configure coloring of output: auto = colorize if stdout is a tty and tests are run @@ -126,7 +124,9 @@ Options: pretty = Print verbose output; terse = Display one character per test; json = Output a json document; - --show-output Show captured stdout of successful tests + --list List all tests and benchmarks + -q, --quiet Display one character per test instead of one line. + Alias to --format=terse -Z unstable-options Enable nightly-only flags: unstable-options = Allow use of experimental features "#; From 503cbbf045d9939febe961d334fdc03f688c5269 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 14 Aug 2025 16:23:45 -0500 Subject: [PATCH 2/2] fix(lexarg)!: Rename --nocapture to --no-capture See rust-lang/rust#133073 --- crates/libtest-lexarg/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/libtest-lexarg/src/lib.rs b/crates/libtest-lexarg/src/lib.rs index ed95ae1..aeffd1e 100644 --- a/crates/libtest-lexarg/src/lib.rs +++ b/crates/libtest-lexarg/src/lib.rs @@ -108,7 +108,7 @@ Options: --ignored Run only ignored tests --include-ignored Run ignored and not ignored tests - --nocapture don't capture stdout/stderr of each task, allow + --no-capture don't capture stdout/stderr of each task, allow printing directly --show-output Show captured stdout of successful tests --test-threads n_threads @@ -141,7 +141,7 @@ By default, all tests are run in parallel. This can be altered with the tests (set it to 1). All tests have their standard output and standard error captured by default. -This can be overridden with the --nocapture flag to a value other than "0". +This can be overridden with the --no-capture flag to a value other than "0". Logging is not captured by default. Test Attributes: @@ -199,7 +199,7 @@ impl TestOptsBuilder { Long("list") => { self.opts.list = true; } - Long("nocapture") => { + Long("no-capture") => { self.opts.nocapture = true; } Long("test-threads") => {