Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cli/tests/shell_completions_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,14 +1012,12 @@ cmd other help="Another subcommand"
let lines: Vec<&str> = output.lines().collect();

assert!(
lines.iter().any(|l| *l == "sub\tA subcommand\tsub"),
lines.contains(&"sub\tA subcommand\tsub"),
"Expected 'sub\\tA subcommand\\tsub' in zsh output, got: {:?}",
lines
);
assert!(
lines
.iter()
.any(|l| *l == "other\tAnother subcommand\tother"),
lines.contains(&"other\tAnother subcommand\tother"),
"Expected 'other\\tAnother subcommand\\tother' in zsh output, got: {:?}",
lines
);
Expand Down
3 changes: 2 additions & 1 deletion lib/benches/parse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use criterion::{criterion_group, criterion_main, Criterion};
use std::hint::black_box;
use usage::{parse, Spec, SpecArg, SpecCommand, SpecFlag};

fn build_small_spec() -> Spec {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2048,11 +2048,11 @@ mod tests {
// (d) Negative case: a purely-local flag that shares nothing with a global is NOT
// promoted/merged — it is correctly dropped when descending into the mount.
assert!(
parsed.available_flags.get("-f").is_none(),
!parsed.available_flags.contains_key("-f"),
"purely-local -f must not be promoted onto a global",
);
assert!(
parsed.available_flags.get("--force").is_none(),
!parsed.available_flags.contains_key("--force"),
"purely-local --force must not be promoted onto a global",
);

Expand Down