chore(complete): Update completest-pty

This commit is contained in:
Ed Page 2024-01-15 14:42:42 -06:00
parent f524d84c1d
commit c742b8eb0c
6 changed files with 27 additions and 26 deletions

4
Cargo.lock generated
View file

@ -624,9 +624,9 @@ dependencies = [
[[package]] [[package]]
name = "completest-pty" name = "completest-pty"
version = "0.4.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c3a1a4d91c06d649d8b3db8d1ff8712623c7a5642d7aad74bb122522ac9e055" checksum = "2a6d1272e27f608f97616be67a2aed03ed8d73910b5df9a7f4a50c4ffd59d185"
dependencies = [ dependencies = [
"completest", "completest",
"ptyprocess", "ptyprocess",

View file

@ -46,7 +46,7 @@ snapbox = { version = "0.4.15", features = ["diff", "path", "examples"] }
# Cutting out `filesystem` feature # Cutting out `filesystem` feature
trycmd = { version = "0.14.19", default-features = false, features = ["color-auto", "diff", "examples"] } trycmd = { version = "0.14.19", default-features = false, features = ["color-auto", "diff", "examples"] }
completest = "0.4.0" completest = "0.4.0"
completest-pty = "0.4.0" completest-pty = "0.5.0"
clap = { path = "../", version = "4.0.0", default-features = false, features = ["std", "derive", "help"] } clap = { path = "../", version = "4.0.0", default-features = false, features = ["std", "derive", "help"] }
[[example]] [[example]]

View file

@ -156,9 +156,9 @@ fn complete() {
common::load_runtime::<completest_pty::BashRuntimeBuilder>("static", "exhaustive"); common::load_runtime::<completest_pty::BashRuntimeBuilder>("static", "exhaustive");
let input = "exhaustive \t\t"; let input = "exhaustive \t\t";
let expected = r#"% let expected = r#"%
-h --global --help action value last hint help -h --global --help action value last hint help
-V --generate --version quote pacman alias complete"#; -V --generate --version quote pacman alias complete "#;
let actual = runtime.complete(input, &term).unwrap(); let actual = runtime.complete(input, &term).unwrap();
snapbox::assert_eq(expected, actual); snapbox::assert_eq(expected, actual);
} }

View file

@ -139,21 +139,22 @@ fn complete() {
let input = "exhaustive \t"; let input = "exhaustive \t";
let expected = r#"% exhaustive --generate let expected = r#"% exhaustive --generate
--generate generate COMPLETING argument
--global everywhere --generate generate
--help Print help --global everywhere
--version Print version --help Print help
-V Print version --version Print version
-h Print help -V Print version
action action -h Print help
alias alias action action
complete Register shell completions for this program alias alias
complete Register shell completions for this program
help Print this message or the help of the given subcommand(s) help Print this message or the help of the given subcommand(s)
hint hint hint hint
last last last last
pacman pacman pacman pacman
quote quote quote quote
value value"#; value value "#;
let actual = runtime.complete(input, &term).unwrap(); let actual = runtime.complete(input, &term).unwrap();
snapbox::assert_eq(expected, actual); snapbox::assert_eq(expected, actual);
} }

View file

@ -138,15 +138,15 @@ fn complete() {
common::load_runtime::<completest_pty::FishRuntimeBuilder>("static", "exhaustive"); common::load_runtime::<completest_pty::FishRuntimeBuilder>("static", "exhaustive");
let input = "exhaustive \t"; let input = "exhaustive \t";
let expected = r#"% exhaustive let expected = r#"% exhaustive
action complete (Register shell completions for this program) hint pacman value action complete (Register shell completions for this program) hint pacman value
alias help (Print this message or the help of the given subcommand(s)) last quote"#; alias help (Print this message or the help of the given subcommand(s)) last quote "#;
let actual = runtime.complete(input, &term).unwrap(); let actual = runtime.complete(input, &term).unwrap();
snapbox::assert_eq(expected, actual); snapbox::assert_eq(expected, actual);
let input = "exhaustive quote --choice \t"; let input = "exhaustive quote --choice \t";
let actual = runtime.complete(input, &term).unwrap(); let actual = runtime.complete(input, &term).unwrap();
let expected = r#"% exhaustive quote --choice let expected = r#"% exhaustive quote --choice
bash (bash (shell)) fish (fish shell) zsh (zsh shell)"#; bash (bash (shell)) fish (fish shell) zsh (zsh shell)"#;
snapbox::assert_eq(expected, actual); snapbox::assert_eq(expected, actual);
} }

View file

@ -139,9 +139,9 @@ fn complete() {
let input = "exhaustive \t"; let input = "exhaustive \t";
let expected = r#"% exhaustive let expected = r#"% exhaustive
complete -- Register shell completions for this program complete -- Register shell completions for this program
help -- Print this message or the help of the given subcommand(s) help -- Print this message or the help of the given subcommand(s)
pacman action alias value quote hint last --"#; pacman action alias value quote hint last -- "#;
let actual = runtime.complete(input, &term).unwrap(); let actual = runtime.complete(input, &term).unwrap();
snapbox::assert_eq(expected, actual); snapbox::assert_eq(expected, actual);
} }