test(complete): Make it order independent

This commit is contained in:
Ed Page 2024-02-08 06:19:06 -06:00
parent b0fea2bac6
commit ea77b98da3

View file

@ -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";