Skip to content

Commit

Permalink
Merge pull request #5310 from epage/pty
Browse files Browse the repository at this point in the history
chore(complete): Update completest-pty
  • Loading branch information
epage authored Jan 15, 2024
2 parents f524d84 + c742b8e commit b250c0b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clap_complete/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ snapbox = { version = "0.4.15", features = ["diff", "path", "examples"] }
# Cutting out `filesystem` feature
trycmd = { version = "0.14.19", default-features = false, features = ["color-auto", "diff", "examples"] }
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"] }

[[example]]
Expand Down
6 changes: 3 additions & 3 deletions clap_complete/tests/testsuite/bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ fn complete() {
common::load_runtime::<completest_pty::BashRuntimeBuilder>("static", "exhaustive");

let input = "exhaustive \t\t";
let expected = r#"%
-h --global --help action value last hint help
-V --generate --version quote pacman alias complete"#;
let expected = r#"%
-h --global --help action value last hint help
-V --generate --version quote pacman alias complete "#;
let actual = runtime.complete(input, &term).unwrap();
snapbox::assert_eq(expected, actual);
}
Expand Down
29 changes: 15 additions & 14 deletions clap_complete/tests/testsuite/elvish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,22 @@ fn complete() {

let input = "exhaustive \t";
let expected = r#"% exhaustive --generate
--generate generate
--global everywhere
--help Print help
--version Print version
-V Print version
-h Print help
action action
alias alias
complete Register shell completions for this program
COMPLETING argument
--generate generate
--global everywhere
--help Print help
--version Print version
-V Print version
-h Print help
action action
alias alias
complete Register shell completions for this program
help Print this message or the help of the given subcommand(s)
hint hint
last last
pacman pacman
quote quote
value value"#;
hint hint
last last
pacman pacman
quote quote
value value "#;
let actual = runtime.complete(input, &term).unwrap();
snapbox::assert_eq(expected, actual);
}
6 changes: 3 additions & 3 deletions clap_complete/tests/testsuite/fish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ fn complete() {
common::load_runtime::<completest_pty::FishRuntimeBuilder>("static", "exhaustive");

let input = "exhaustive \t";
let expected = r#"% exhaustive
let expected = r#"% exhaustive
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();
snapbox::assert_eq(expected, actual);

let input = "exhaustive quote --choice \t";
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)"#;
snapbox::assert_eq(expected, actual);
}
Expand Down
6 changes: 3 additions & 3 deletions clap_complete/tests/testsuite/zsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ fn complete() {

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

0 comments on commit b250c0b

Please sign in to comment.