mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
test(complete): Make it order independent
This commit is contained in:
parent
b0fea2bac6
commit
ea77b98da3
1 changed files with 2 additions and 5 deletions
|
@ -222,7 +222,6 @@ fn complete() {
|
|||
);
|
||||
}
|
||||
|
||||
// Issue 5313 (https://github.com/clap-rs/clap/issues/5313)
|
||||
{
|
||||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
|
@ -234,13 +233,11 @@ fn complete() {
|
|||
File::create(Path::new(testdir_path).join("baz\tqux.txt")).unwrap();
|
||||
|
||||
let input = format!(
|
||||
"exhaustive hint --file {}/\t\t",
|
||||
"exhaustive hint --file {}/b\t",
|
||||
testdir_path.to_string_lossy()
|
||||
);
|
||||
let expected = r#"%
|
||||
foo bar.txt baz^Iqux.txt "#;
|
||||
let actual = runtime.complete(input.as_str(), &term).unwrap();
|
||||
snapbox::assert_eq(expected, actual);
|
||||
assert!(!actual.contains("foo"), "Actual output:\n{actual}");
|
||||
}
|
||||
|
||||
let input = "exhaustive hint --other \t";
|
||||
|
|
Loading…
Add table
Reference in a new issue