From c742b8eb0ca648b645b616e064e00408944f390e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 15 Jan 2024 14:42:42 -0600 Subject: [PATCH] chore(complete): Update completest-pty --- Cargo.lock | 4 ++-- clap_complete/Cargo.toml | 2 +- clap_complete/tests/testsuite/bash.rs | 6 ++--- clap_complete/tests/testsuite/elvish.rs | 29 +++++++++++++------------ clap_complete/tests/testsuite/fish.rs | 6 ++--- clap_complete/tests/testsuite/zsh.rs | 6 ++--- 6 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 186e67f32b4..1ae06097361 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -624,9 +624,9 @@ dependencies = [ [[package]] name = "completest-pty" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a1a4d91c06d649d8b3db8d1ff8712623c7a5642d7aad74bb122522ac9e055" +checksum = "2a6d1272e27f608f97616be67a2aed03ed8d73910b5df9a7f4a50c4ffd59d185" dependencies = [ "completest", "ptyprocess", diff --git a/clap_complete/Cargo.toml b/clap_complete/Cargo.toml index 18a70865d2e..2e20b0d3880 100644 --- a/clap_complete/Cargo.toml +++ b/clap_complete/Cargo.toml @@ -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]] diff --git a/clap_complete/tests/testsuite/bash.rs b/clap_complete/tests/testsuite/bash.rs index 3554bf3b27d..2e960136704 100644 --- a/clap_complete/tests/testsuite/bash.rs +++ b/clap_complete/tests/testsuite/bash.rs @@ -156,9 +156,9 @@ fn complete() { common::load_runtime::("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); } diff --git a/clap_complete/tests/testsuite/elvish.rs b/clap_complete/tests/testsuite/elvish.rs index 759a88581d5..09179509891 100644 --- a/clap_complete/tests/testsuite/elvish.rs +++ b/clap_complete/tests/testsuite/elvish.rs @@ -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); } diff --git a/clap_complete/tests/testsuite/fish.rs b/clap_complete/tests/testsuite/fish.rs index a7f7b62f945..217470f7b71 100644 --- a/clap_complete/tests/testsuite/fish.rs +++ b/clap_complete/tests/testsuite/fish.rs @@ -138,15 +138,15 @@ fn complete() { common::load_runtime::("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); } diff --git a/clap_complete/tests/testsuite/zsh.rs b/clap_complete/tests/testsuite/zsh.rs index 4d1429e8439..fdf685c5cf4 100644 --- a/clap_complete/tests/testsuite/zsh.rs +++ b/clap_complete/tests/testsuite/zsh.rs @@ -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); }