From bb830e390bb2241688f2b9b22036f19039ef9119 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 15 Oct 2025 15:40:25 -0500 Subject: [PATCH 1/2] chore: Update snapbox --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 090a5c355d..39c8cfc175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2483,9 +2483,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "snapbox" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96dcfc4581e3355d70ac2ee14cfdf81dce3d85c85f1ed9e2c1d3013f53b3436b" +checksum = "805d09a74586d9b17061e5be6ee5f8cc37e5982c349948114ffc5f68093fe5ec" dependencies = [ "anstream", "anstyle", @@ -2500,7 +2500,7 @@ dependencies = [ "tempfile", "wait-timeout", "walkdir", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index bd3bc10228..b7057956ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,7 +103,7 @@ xz2 = "0.1.3" zstd = { version = "0.13", default-features = false } # test only (depends on `test` feature) -snapbox = { version = "0.6.21", optional = true } +snapbox = { version = "0.6.22", optional = true } walkdir = { version = "2", optional = true } [target."cfg(windows)".dependencies] From 27a38f13830a538de1247c72144a5d41f6db7217 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 15 Oct 2025 14:57:00 -0500 Subject: [PATCH 2/2] test: Replace trycmd with snapbox --- Cargo.lock | 131 ++----- Cargo.toml | 3 +- .../rustup-init_help_flag_stdout.toml | 37 -- .../rustup-init_sh_help_flag_stdout.toml | 37 -- .../rustup_check_cmd_help_flag_stdout.toml | 13 - ...stup_completions_cmd_help_flag_stdout.toml | 137 ------- ...omponent_cmd_add_cmd_help_flag_stdout.toml | 18 - ...mponent_cmd_list_cmd_help_flag_stdout.toml | 16 - ...onent_cmd_remove_cmd_help_flag_stdout.toml | 18 - .../rustup_default_cmd_help_flag_stdout.toml | 22 -- .../rustup_doc_cmd_help_flag_stdout.toml | 47 --- .../cli-ui/rustup/rustup_help_cmd_stdout.toml | 48 --- .../rustup/rustup_help_flag_stdout.toml | 48 --- .../rustup_man_cmd_help_flag_stdout.toml | 17 - .../rustup/rustup_only_options_stdout.toml | 57 --- ...override_cmd_add_cmd_help_flag_stdout.toml | 17 - .../rustup_override_cmd_help_flag_stdout.toml | 39 -- ...verride_cmd_list_cmd_help_flag_stdout.toml | 12 - ...rride_cmd_remove_cmd_help_flag_stdout.toml | 21 - ...override_cmd_set_cmd_help_flag_stdout.toml | 17 - ...erride_cmd_unset_cmd_help_flag_stdout.toml | 21 - .../rustup_run_cmd_help_flag_stdout.toml | 33 -- .../rustup_self_cmd_help_flag_stdout.toml | 18 - ...lf_cmd_uninstall_cmd_help_flag_stdout.toml | 13 - ..._self_cmd_update_cmd_help_flag_stdout.toml | 12 - ...md_upgrade-data _cmd_help_flag_stdout.toml | 12 - ...cmd_auto-install_cmd_help_flag_stdout.toml | 15 - ...auto-self-update_cmd_help_flag_stdout.toml | 15 - ...cmd_default-host_cmd_help_flag_stdout.toml | 15 - .../rustup_set_cmd_help_flag_stdout.toml | 19 - ..._set_cmd_profile_cmd_help_flag_stdout.toml | 15 - ...active-toolchain_cmd_help_flag_stdout.toml | 22 -- .../rustup_show_cmd_help_flag_stdout.toml | 28 -- ...up_show_cmd_home_cmd_help_flag_stdout.toml | 12 - ...show_cmd_profile_cmd_help_flag_stdout.toml | 12 - ...p_target_cmd_add_cmd_help_flag_stdout.toml | 17 - .../rustup_target_cmd_help_flag_stdout.toml | 18 - ..._target_cmd_list_cmd_help_flag_stdout.toml | 16 - ...arget_cmd_remove_cmd_help_flag_stdout.toml | 17 - ...rustup_toolchain_cmd_help_flag_stdout.toml | 63 --- ...hain_cmd_install_cmd_help_flag_stdout.toml | 25 -- ...olchain_cmd_link_cmd_help_flag_stdout.toml | 37 -- ...olchain_cmd_list_cmd_help_flag_stdout.toml | 14 - ...in_cmd_uninstall_cmd_help_flag_stdout.toml | 15 - .../rustup/rustup_unknown_arg_stdout.toml | 9 - .../rustup_up_cmd_help_flag_stdout.toml | 28 -- .../rustup_update_cmd_help_flag_stdout.toml | 28 -- .../rustup_upgrade_cmd_help_flag_stdout.toml | 28 -- .../rustup_which_cmd_help_flag_stdout.toml | 17 - tests/suite/cli_rustup_init_ui.rs | 64 ++++ .../rustup_init_help_flag.stdout.term.svg | 85 +++++ .../rustup_init_sh_help_flag.stdout.term.svg | 85 +++++ tests/suite/cli_rustup_ui.rs | 361 ++++++++++++++++++ ...rustup_check_cmd_help_flag.stdout.term.svg | 37 ++ ..._completions_cmd_help_flag.stdout.term.svg | 285 ++++++++++++++ ...nent_cmd_add_cmd_help_flag.stdout.term.svg | 47 +++ ...up_component_cmd_help_flag.stdout.term.svg | 47 +++ ...ent_cmd_list_cmd_help_flag.stdout.term.svg | 43 +++ ...t_cmd_remove_cmd_help_flag.stdout.term.svg | 47 +++ ...stup_default_cmd_help_flag.stdout.term.svg | 55 +++ .../rustup_doc_cmd_help_flag.stdout.term.svg | 105 +++++ .../rustup_help_cmd.stdout.term.svg | 107 ++++++ .../rustup_help_flag.stdout.term.svg | 107 ++++++ .../rustup_man_cmd_help_flag.stdout.term.svg | 45 +++ .../rustup_only_options.stderr.term.svg | 125 ++++++ ...ride_cmd_add_cmd_help_flag.stdout.term.svg | 45 +++ ...tup_override_cmd_help_flag.stdout.term.svg | 89 +++++ ...ide_cmd_list_cmd_help_flag.stdout.term.svg | 35 ++ ...e_cmd_remove_cmd_help_flag.stdout.term.svg | 53 +++ ...ride_cmd_set_cmd_help_flag.stdout.term.svg | 45 +++ ...de_cmd_unset_cmd_help_flag.stdout.term.svg | 53 +++ .../rustup_run_cmd_help_flag.stdout.term.svg | 77 ++++ .../rustup_self_cmd_help_flag.stdout.term.svg | 47 +++ ...md_uninstall_cmd_help_flag.stdout.term.svg | 37 ++ ...f_cmd_update_cmd_help_flag.stdout.term.svg | 35 ++ ...upgrade_data_cmd_help_flag.stdout.term.svg | 35 ++ ...auto_install_cmd_help_flag.stdout.term.svg | 41 ++ ..._self_update_cmd_help_flag.stdout.term.svg | 41 ++ ...default_host_cmd_help_flag.stdout.term.svg | 41 ++ .../rustup_set_cmd_help_flag.stdout.term.svg | 49 +++ ..._cmd_profile_cmd_help_flag.stdout.term.svg | 41 ++ ...ve_toolchain_cmd_help_flag.stdout.term.svg | 55 +++ .../rustup_show_cmd_help_flag.stdout.term.svg | 67 ++++ ...how_cmd_home_cmd_help_flag.stdout.term.svg | 35 ++ ..._cmd_profile_cmd_help_flag.stdout.term.svg | 35 ++ ...rget_cmd_add_cmd_help_flag.stdout.term.svg | 45 +++ ...ustup_target_cmd_help_flag.stdout.term.svg | 47 +++ ...get_cmd_list_cmd_help_flag.stdout.term.svg | 43 +++ ...t_cmd_remove_cmd_help_flag.stdout.term.svg | 45 +++ ...up_toolchain_cmd_help_flag.stdout.term.svg | 137 +++++++ ..._cmd_install_cmd_help_flag.stdout.term.svg | 63 +++ ...ain_cmd_link_cmd_help_flag.stdout.term.svg | 85 +++++ ...ain_cmd_list_cmd_help_flag.stdout.term.svg | 39 ++ ...md_uninstall_cmd_help_flag.stdout.term.svg | 43 +++ .../rustup_unknown_arg.stderr.term.svg | 29 ++ .../rustup_up_cmd_help_flag.stdout.term.svg | 67 ++++ ...ustup_update_cmd_help_flag.stdout.term.svg | 67 ++++ ...stup_upgrade_cmd_help_flag.stdout.term.svg | 67 ++++ ...rustup_which_cmd_help_flag.stdout.term.svg | 45 +++ tests/suite/cli_ui.rs | 65 ---- tests/suite/mod.rs | 3 +- 101 files changed, 3465 insertions(+), 1375 deletions(-) delete mode 100644 tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_check_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_component_cmd_add_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_component_cmd_list_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_component_cmd_remove_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_default_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_doc_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_man_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_only_options_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_override_cmd_add_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_override_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_override_cmd_list_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_override_cmd_remove_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_override_cmd_set_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_override_cmd_unset_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_run_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_self_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_self_cmd_uninstall_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_self_cmd_update_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_self_cmd_upgrade-data _cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_set_cmd_auto-install_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_set_cmd_auto-self-update_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_set_cmd_default-host_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_set_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_set_cmd_profile_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_show_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_show_cmd_home_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_show_cmd_profile_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_target_cmd_add_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_target_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_target_cmd_list_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_target_cmd_remove_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_toolchain_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_toolchain_cmd_install_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_toolchain_cmd_link_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_toolchain_cmd_list_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_toolchain_cmd_uninstall_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_unknown_arg_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_up_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_update_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_upgrade_cmd_help_flag_stdout.toml delete mode 100644 tests/suite/cli-ui/rustup/rustup_which_cmd_help_flag_stdout.toml create mode 100644 tests/suite/cli_rustup_init_ui.rs create mode 100644 tests/suite/cli_rustup_init_ui/rustup_init_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_init_ui/rustup_init_sh_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui.rs create mode 100644 tests/suite/cli_rustup_ui/rustup_check_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_completions_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_component_cmd_add_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_component_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_component_cmd_list_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_component_cmd_remove_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_default_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_doc_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_man_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_only_options.stderr.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_override_cmd_add_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_override_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_override_cmd_list_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_override_cmd_remove_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_override_cmd_set_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_override_cmd_unset_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_run_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_self_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_self_cmd_uninstall_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_self_cmd_update_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_self_cmd_upgrade_data_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_set_cmd_auto_install_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_set_cmd_auto_self_update_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_set_cmd_default_host_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_set_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_set_cmd_profile_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_show_cmd_active_toolchain_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_show_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_show_cmd_home_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_show_cmd_profile_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_target_cmd_add_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_target_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_target_cmd_list_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_target_cmd_remove_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_toolchain_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_toolchain_cmd_install_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_toolchain_cmd_link_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_toolchain_cmd_list_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_toolchain_cmd_uninstall_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_unknown_arg.stderr.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_up_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_update_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_upgrade_cmd_help_flag.stdout.term.svg create mode 100644 tests/suite/cli_rustup_ui/rustup_which_cmd_help_flag.stdout.term.svg delete mode 100644 tests/suite/cli_ui.rs diff --git a/Cargo.lock b/Cargo.lock index 39c8cfc175..f9ef6fa023 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,6 +56,15 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +[[package]] +name = "anstyle-lossy" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d3a5dc826f84d0ea11882bb8054ff7f3d482602e11bb181101303a279ea01f" +dependencies = [ + "anstyle", +] + [[package]] name = "anstyle-parse" version = "0.2.7" @@ -74,6 +83,19 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "anstyle-svg" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b9ec8c976eada1b0f9747a3d7cc4eae3bef10613e443746e7487f26c872fde" +dependencies = [ + "anstyle", + "anstyle-lossy", + "anstyle-parse", + "html-escape", + "unicode-width", +] + [[package]] name = "anstyle-wincon" version = "3.0.10" @@ -136,17 +158,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "automod" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb4bd301db2e2ca1f5be131c24eb8ebf2d9559bc3744419e93baf8ddea7e670" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "aws-lc-rs" version = "1.14.1" @@ -435,15 +446,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "content_inspector" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38" -dependencies = [ - "memchr", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -940,6 +942,15 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "html-escape" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" +dependencies = [ + "utf8-width", +] + [[package]] name = "http" version = "1.3.1" @@ -986,22 +997,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - -[[package]] -name = "humantime-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" -dependencies = [ - "humantime", - "serde", -] - [[package]] name = "hyper" version = "1.7.0" @@ -1698,16 +1693,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "os_pipe" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "percent-encoding" version = "2.3.2" @@ -2266,7 +2251,6 @@ dependencies = [ "tracing-log", "tracing-opentelemetry", "tracing-subscriber", - "trycmd", "url", "wait-timeout", "walkdir", @@ -2489,18 +2473,11 @@ checksum = "805d09a74586d9b17061e5be6ee5f8cc37e5982c349948114ffc5f68093fe5ec" dependencies = [ "anstream", "anstyle", - "content_inspector", - "dunce", - "filetime", - "libc", + "anstyle-svg", "normalize-line-endings", - "os_pipe", + "serde_json", "similar", "snapbox-macros", - "tempfile", - "wait-timeout", - "walkdir", - "windows-sys 0.60.2", ] [[package]] @@ -2822,21 +2799,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" -dependencies = [ - "indexmap", - "serde_core", - "serde_spanned", - "toml_datetime", - "toml_parser", - "toml_writer", - "winnow", -] - [[package]] name = "toml_parser" version = "1.0.4" @@ -3024,24 +2986,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "trycmd" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659488a954e37cc663704c169f829952c49b315e2fe5fd375508baffa698f106" -dependencies = [ - "anstream", - "automod", - "glob", - "humantime", - "humantime-serde", - "rayon", - "serde", - "shlex", - "snapbox", - "toml_edit", -] - [[package]] name = "typenum" version = "1.19.0" @@ -3096,6 +3040,12 @@ dependencies = [ "serde", ] +[[package]] +name = "utf8-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -3594,9 +3544,6 @@ name = "winnow" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" -dependencies = [ - "memchr", -] [[package]] name = "wit-bindgen" diff --git a/Cargo.toml b/Cargo.toml index b7057956ae..c82bf3419f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,7 +103,7 @@ xz2 = "0.1.3" zstd = { version = "0.13", default-features = false } # test only (depends on `test` feature) -snapbox = { version = "0.6.22", optional = true } +snapbox = { version = "0.6.22", features = ["term-svg"], optional = true } walkdir = { version = "2", optional = true } [target."cfg(windows)".dependencies] @@ -139,7 +139,6 @@ http-body-util = "0.1.0" hyper = { version = "1.0", default-features = false, features = ["server", "http1"] } hyper-util = { version = "0.1.1", features = ["tokio"] } proptest = "1.1.0" -trycmd = "0.15.0" [build-dependencies] platforms = "3.4" diff --git a/tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml b/tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml deleted file mode 100644 index 3baeac1596..0000000000 --- a/tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml +++ /dev/null @@ -1,37 +0,0 @@ -bin.name = "rustup-init" -args = ["--help"] -status.code = 0 -stdout = """ -rustup-init [..] - -The installer for rustup - -Usage: rustup-init[EXE] [OPTIONS] - -Options: - -v, --verbose - Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset - -q, --quiet - Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset - -y - Disable confirmation prompt - --default-host - Choose a default host triple - --default-toolchain - Choose a default toolchain to install. Use 'none' to not install any toolchains at all - --profile - [default: default] [possible values: minimal, default, complete] - -c, --component - Comma-separated list of component names to also install - -t, --target - Comma-separated list of target names to also install - --no-update-default-toolchain - Don't update any existing default toolchain after install - --no-modify-path - Don't configure the PATH environment variable - -h, --help - Print help - -V, --version - Print version -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml b/tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml deleted file mode 100644 index a54ca013e1..0000000000 --- a/tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml +++ /dev/null @@ -1,37 +0,0 @@ -bin.name = "rustup-init.sh" -args = ["--help"] -status.code = 0 -stdout = """ -rustup-init [..] - -The installer for rustup - -Usage: rustup-init[EXE] [OPTIONS] - -Options: - -v, --verbose - Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset - -q, --quiet - Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset - -y - Disable confirmation prompt - --default-host - Choose a default host triple - --default-toolchain - Choose a default toolchain to install. Use 'none' to not install any toolchains at all - --profile - [default: default] [possible values: minimal, default, complete] - -c, --component - Comma-separated list of component names to also install - -t, --target - Comma-separated list of target names to also install - --no-update-default-toolchain - Don't update any existing default toolchain after install - --no-modify-path - Don't configure the PATH environment variable - -h, --help - Print help - -V, --version - Print version -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_check_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_check_cmd_help_flag_stdout.toml deleted file mode 100644 index 0f0179cc65..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_check_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,13 +0,0 @@ -bin.name = "rustup" -args = ["check", "--help"] -stdout = """ -... -Check for updates to Rust toolchains and rustup - -Usage: rustup[EXE] check [OPTIONS] - -Options: - --no-self-update Don't check for self update when running the `rustup check` command - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml deleted file mode 100644 index ab01a81f9f..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,137 +0,0 @@ -bin.name = "rustup" -args = ["completions", "--help"] -stdout = """ -... -Generate tab-completion scripts for your shell - -Usage: rustup[EXE] completions [COMMAND] - -Arguments: - [possible values: bash, elvish, fish, powershell, zsh] - [COMMAND] [default: rustup] [possible values: rustup, cargo] - -Options: - -h, --help Print help - -Discussion: - Enable tab completion for Bash, Fish, Zsh, or PowerShell - The script is output on `stdout`, allowing one to re-direct the - output to the file of their choosing. Where you place the file - will depend on which shell, and which operating system you are - using. Your particular configuration may also determine where - these scripts need to be placed. - - Here are some common set ups for the three supported shells under - Unix and similar operating systems (such as GNU/Linux). - - Bash: - - Completion files are commonly stored in `/etc/bash_completion.d/` for - system-wide commands, but can be stored in - `~/.local/share/bash-completion/completions` for user-specific commands. - Run the command: - - $ mkdir -p ~/.local/share/bash-completion/completions - $ rustup completions bash > ~/.local/share/bash-completion/completions/rustup - - This installs the completion script. You may have to log out and - log back in to your shell session for the changes to take effect. - - Bash (macOS/Homebrew): - - Homebrew stores bash completion files within the Homebrew directory. - With the `bash-completion` brew formula installed, run the command: - - $ mkdir -p $(brew --prefix)/etc/bash_completion.d - $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion - - Fish: - - Fish completion files are commonly stored in - `$HOME/.config/fish/completions`. Run the command: - - $ mkdir -p ~/.config/fish/completions - $ rustup completions fish > ~/.config/fish/completions/rustup.fish - - This installs the completion script. You may have to log out and - log back in to your shell session for the changes to take effect. - - Zsh: - - ZSH completions are commonly stored in any directory listed in - your `$fpath` variable. To use these completions, you must either - add the generated script to one of those directories, or add your - own to this list. - - Adding a custom directory is often the safest bet if you are - unsure of which directory to use. First create the directory; for - this example we'll create a hidden directory inside our `$HOME` - directory: - - $ mkdir ~/.zfunc - - Then add the following lines to your `.zshrc` just before - `compinit`: - - fpath+=~/.zfunc - - Now you can install the completions script using the following - command: - - $ rustup completions zsh > ~/.zfunc/_rustup - - You must then either log out and log back in, or simply run - - $ exec zsh - - for the new completions to take effect. - - Custom locations: - - Alternatively, you could save these files to the place of your - choosing, such as a custom directory inside your $HOME. Doing so - will require you to add the proper directives, such as `source`ing - inside your login script. Consult your shells documentation for - how to add such directives. - - PowerShell: - - The powershell completion scripts require PowerShell v5.0+ (which - comes with Windows 10, but can be downloaded separately for windows 7 - or 8.1). - - First, check if a profile has already been set - - PS C:/> Test-Path $profile - - If the above command returns `False` run the following - - PS C:/> New-Item -path $profile -type file -force - - Now open the file provided by `$profile` (if you used the - `New-Item` command it will be - `${env:USERPROFILE}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1` - - Next, we either save the completions file into our profile, or - into a separate file and source it inside our profile. To save the - completions into our profile simply use - - PS C:/> rustup completions powershell >> - ${env:USERPROFILE}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 - - Cargo: - - Rustup can also generate a completion script for `cargo`. The script output - by `rustup` will source the completion script distributed with your default - toolchain. Not all shells are currently supported. Here are examples for - the currently supported shells. - - Bash: - - $ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo - - Zsh: - - $ rustup completions zsh cargo > ~/.zfunc/_cargo -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_component_cmd_add_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_component_cmd_add_cmd_help_flag_stdout.toml deleted file mode 100644 index e40c683361..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_component_cmd_add_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,18 +0,0 @@ -bin.name = "rustup" -args = ["component", "add", "--help"] -stdout = """ -... -Add a component to a Rust toolchain - -Usage: rustup[EXE] component add [OPTIONS] ... - -Arguments: - ... - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - --target - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_component_cmd_list_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_component_cmd_list_cmd_help_flag_stdout.toml deleted file mode 100644 index e0f3cb89b1..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_component_cmd_list_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,16 +0,0 @@ -bin.name = "rustup" -args = ["component", "list", "--help"] -stdout = """ -... -List installed and available components - -Usage: rustup[EXE] component list [OPTIONS] - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - --installed List only installed components - -q, --quiet Force the output to be a single column - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_component_cmd_remove_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_component_cmd_remove_cmd_help_flag_stdout.toml deleted file mode 100644 index a2f5a2980d..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_component_cmd_remove_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,18 +0,0 @@ -bin.name = "rustup" -args = ["component", "remove", "--help"] -stdout = """ -... -Remove a component from a Rust toolchain - -Usage: rustup[EXE] component remove [OPTIONS] ... - -Arguments: - ... - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - --target - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_default_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_default_cmd_help_flag_stdout.toml deleted file mode 100644 index 3c688e43f4..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_default_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,22 +0,0 @@ -bin.name = "rustup" -args = ["default", "--help"] -stdout = """ -... -Set the default toolchain - -Usage: rustup[EXE] default [OPTIONS] [TOOLCHAIN] - -Arguments: - [TOOLCHAIN] 'none', a toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain - name. For more information see `rustup help toolchain` - -Options: - --force-non-host Install toolchains that require an emulator. See - https://github.com/rust-lang/rustup/wiki/Non-host-toolchains - -h, --help Print help - -Discussion: - Sets the default toolchain to the one specified. If the toolchain - is not already installed then it is installed first. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_doc_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_doc_cmd_help_flag_stdout.toml deleted file mode 100644 index bca8397642..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_doc_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,47 +0,0 @@ -bin.name = "rustup" -args = ["doc", "--help"] -stdout = """ -... -Open the documentation for the current toolchain - -Usage: rustup[EXE] doc [OPTIONS] [TOPIC] - -Arguments: - [TOPIC] Topic such as 'core', 'fn', 'usize', 'eprintln!', 'core::arch', 'alloc::format!', - 'std::fs', 'std::fs::read_dir', 'std::io::Bytes', 'std::iter::Sum', - 'std::io::error::Result' etc... - -Options: - --path Only print the path to the documentation - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - --alloc The Rust core allocation and collections library - --book The Rust Programming Language book - --cargo The Cargo Book - --clippy The Clippy Documentation - --core The Rust Core Library - --edition-guide The Rust Edition Guide - --embedded-book The Embedded Rust Book - --error-codes The Rust Error Codes Index - --nomicon The Dark Arts of Advanced and Unsafe Rust Programming - --proc_macro A support library for macro authors when defining new macros - --reference The Rust Reference - --rust-by-example A collection of runnable examples that illustrate various Rust - concepts and standard libraries - --rustc The compiler for the Rust programming language - --rustdoc Documentation generator for Rust projects - --std Standard library API documentation - --style-guide The Rust Style Guide - --test Support code for rustc's built in unit-test and micro-benchmarking - framework - --unstable-book The Unstable Book - -h, --help Print help - -Discussion: - Opens the documentation for the currently active toolchain with - the default browser. - - By default, it opens the documentation index. Use the various - flags to open specific pieces of documentation. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml b/tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml deleted file mode 100644 index 1a0756c9ce..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml +++ /dev/null @@ -1,48 +0,0 @@ -bin.name = "rustup" -args = ["help"] -status.code = 0 -stdout = """ -rustup [..] - -The Rust toolchain installer - -Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND] - -Commands: - toolchain Install, uninstall, or list toolchains - default Set the default toolchain - show Show the active and installed toolchains or profiles - update Update Rust toolchains and rustup - check Check for updates to Rust toolchains and rustup - target Modify a toolchain's supported targets - component Modify a toolchain's installed components - override Modify toolchain overrides for directories - run Run a command with an environment configured for a given toolchain - which Display which binary will be run for a given command - doc Open the documentation for the current toolchain -... - self Modify the rustup installation - set Alter rustup settings - completions Generate tab-completion scripts for your shell - help Print this message or the help of the given subcommand(s) - -Arguments: - [+toolchain] Release channel (e.g. +stable) or custom toolchain to set override - -Options: - -v, --verbose Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset - -q, --quiet Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset - -h, --help Print help - -V, --version Print version - -Discussion: - Rustup installs The Rust Programming Language from the official - release channels, enabling you to easily switch between stable, - beta, and nightly compilers and keep them updated. It makes - cross-compiling simpler with binary builds of the standard library - for common platforms. - - If you are new to Rust consider running `rustup doc --book` to - learn Rust. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml deleted file mode 100644 index 43f7e01e4c..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml +++ /dev/null @@ -1,48 +0,0 @@ -bin.name = "rustup" -args = ["--help"] -status.code = 0 -stdout = """ -rustup [..] - -The Rust toolchain installer - -Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND] - -Commands: - toolchain Install, uninstall, or list toolchains - default Set the default toolchain - show Show the active and installed toolchains or profiles - update Update Rust toolchains and rustup - check Check for updates to Rust toolchains and rustup - target Modify a toolchain's supported targets - component Modify a toolchain's installed components - override Modify toolchain overrides for directories - run Run a command with an environment configured for a given toolchain - which Display which binary will be run for a given command - doc Open the documentation for the current toolchain -... - self Modify the rustup installation - set Alter rustup settings - completions Generate tab-completion scripts for your shell - help Print this message or the help of the given subcommand(s) - -Arguments: - [+toolchain] Release channel (e.g. +stable) or custom toolchain to set override - -Options: - -v, --verbose Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset - -q, --quiet Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset - -h, --help Print help - -V, --version Print version - -Discussion: - Rustup installs The Rust Programming Language from the official - release channels, enabling you to easily switch between stable, - beta, and nightly compilers and keep them updated. It makes - cross-compiling simpler with binary builds of the standard library - for common platforms. - - If you are new to Rust consider running `rustup doc --book` to - learn Rust. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_man_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_man_cmd_help_flag_stdout.toml deleted file mode 100644 index a35b59460c..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_man_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,17 +0,0 @@ -bin.name = "rustup" -args = ["man", "--help"] -stdout = """ -... -View the man page for a given command - -Usage: rustup[EXE] man [OPTIONS] - -Arguments: - - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_only_options_stdout.toml b/tests/suite/cli-ui/rustup/rustup_only_options_stdout.toml deleted file mode 100644 index bdf5229fe2..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_only_options_stdout.toml +++ /dev/null @@ -1,57 +0,0 @@ -args = ["-q"] -bin.name = "rustup" -status.code = 1 -stderr = """ -rustup [..] - -The Rust toolchain installer - -Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND] - -Commands: - toolchain Install, uninstall, or list toolchains - default Set the default toolchain - show Show the active and installed toolchains or profiles - update Update Rust toolchains and rustup - check Check for updates to Rust toolchains and rustup - target Modify a toolchain's supported targets - component Modify a toolchain's installed components - override Modify toolchain overrides for directories - run Run a command with an environment configured for a given toolchain - which Display which binary will be run for a given command - doc Open the documentation for the current toolchain -... - self Modify the rustup installation - set Alter rustup settings - completions Generate tab-completion scripts for your shell - help Print this message or the help of the given subcommand(s) - -Arguments: - [+toolchain] - Release channel (e.g. +stable) or custom toolchain to set override - -Options: - -v, --verbose - Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset - - -q, --quiet - Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset - - -h, --help - Print help - - -V, --version - Print version - -Discussion: - Rustup installs The Rust Programming Language from the official - release channels, enabling you to easily switch between stable, - beta, and nightly compilers and keep them updated. It makes - cross-compiling simpler with binary builds of the standard library - for common platforms. - - If you are new to Rust consider running `rustup doc --book` to - learn Rust. - -""" -stdout = "" diff --git a/tests/suite/cli-ui/rustup/rustup_override_cmd_add_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_override_cmd_add_cmd_help_flag_stdout.toml deleted file mode 100644 index d48e6e2a86..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_override_cmd_add_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,17 +0,0 @@ -bin.name = "rustup" -args = ["override", "add", "--help"] -stdout = """ -... -Set the override toolchain for a directory - -Usage: rustup[EXE] override set [OPTIONS] - -Arguments: - Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name. For - more information see `rustup help toolchain` - -Options: - --path Path to the directory - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_override_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_override_cmd_help_flag_stdout.toml deleted file mode 100644 index 66546023a0..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_override_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,39 +0,0 @@ -bin.name = "rustup" -args = ["override", "--help"] -stdout = """ -... -Modify toolchain overrides for directories - -Usage: rustup[EXE] override - -Commands: - list List directory toolchain overrides - set Set the override toolchain for a directory - unset Remove the override toolchain for a directory - help Print this message or the help of the given subcommand(s) - -Options: - -h, --help Print help - -Discussion: - Overrides configure Rustup to use a specific toolchain when - running in a specific directory. - - Directories can be assigned their own Rust toolchain with `rustup - override`. When a directory has an override then any time `rustc` - or `cargo` is run inside that directory, or one of its child - directories, the override toolchain will be invoked. - - To pin to a specific nightly: - - $ rustup override set nightly-2014-12-18 - - Or a specific stable release: - - $ rustup override set 1.0.0 - - To see the active toolchain use `rustup show`. To remove the - override and use the default toolchain again, `rustup override - unset`. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_override_cmd_list_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_override_cmd_list_cmd_help_flag_stdout.toml deleted file mode 100644 index 1a1e735367..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_override_cmd_list_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,12 +0,0 @@ -bin.name = "rustup" -args = ["override", "list", "--help"] -stdout = """ -... -List directory toolchain overrides - -Usage: rustup[EXE] override list - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_override_cmd_remove_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_override_cmd_remove_cmd_help_flag_stdout.toml deleted file mode 100644 index 6d12a93427..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_override_cmd_remove_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,21 +0,0 @@ -bin.name = "rustup" -args = ["override", "remove", "--help"] -stdout = """ -... -Remove the override toolchain for a directory - -Usage: rustup[EXE] override unset [OPTIONS] - -Options: - --path Path to the directory - --nonexistent Remove override toolchain for all nonexistent directories - -h, --help Print help - -Discussion: - If `--path` argument is present, removes the override toolchain - for the specified directory. If `--nonexistent` argument is - present, removes the override toolchain for all nonexistent - directories. Otherwise, removes the override toolchain for the - current directory. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_override_cmd_set_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_override_cmd_set_cmd_help_flag_stdout.toml deleted file mode 100644 index 58c7bccb62..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_override_cmd_set_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,17 +0,0 @@ -bin.name = "rustup" -args = ["override", "set", "--help"] -stdout = """ -... -Set the override toolchain for a directory - -Usage: rustup[EXE] override set [OPTIONS] - -Arguments: - Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name. For - more information see `rustup help toolchain` - -Options: - --path Path to the directory - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_override_cmd_unset_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_override_cmd_unset_cmd_help_flag_stdout.toml deleted file mode 100644 index 4a1a455c76..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_override_cmd_unset_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,21 +0,0 @@ -bin.name = "rustup" -args = ["override", "unset", "--help"] -stdout = """ -... -Remove the override toolchain for a directory - -Usage: rustup[EXE] override unset [OPTIONS] - -Options: - --path Path to the directory - --nonexistent Remove override toolchain for all nonexistent directories - -h, --help Print help - -Discussion: - If `--path` argument is present, removes the override toolchain - for the specified directory. If `--nonexistent` argument is - present, removes the override toolchain for all nonexistent - directories. Otherwise, removes the override toolchain for the - current directory. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_run_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_run_cmd_help_flag_stdout.toml deleted file mode 100644 index d5cfcb74ae..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_run_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,33 +0,0 @@ -args = ["run", "--help"] -bin.name = "rustup" -stderr = "" -stdout = """ -... -Run a command with an environment configured for a given toolchain - -Usage: rustup[EXE] run [OPTIONS] ... - -Arguments: - Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name, or - an absolute path. For more information see `rustup help toolchain` - ... - -Options: - --install Install the requested toolchain if needed - -h, --help Print help - -Discussion: - Configures an environment to use the given toolchain and then runs - the specified program. The command may be any program, not just - rustc or cargo. This can be used for testing arbitrary toolchains - without setting an override. - - Commands explicitly proxied by `rustup` (such as `rustc` and - `cargo`) also have a shorthand for this available. The toolchain - can be set by using `+toolchain` as the first argument. These are - equivalent: - - $ cargo +nightly build - - $ rustup run nightly cargo build -""" diff --git a/tests/suite/cli-ui/rustup/rustup_self_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_self_cmd_help_flag_stdout.toml deleted file mode 100644 index b1cf564245..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_self_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,18 +0,0 @@ -bin.name = "rustup" -args = ["self", "--help"] -stdout = """ -... -Modify the rustup installation - -Usage: rustup[EXE] self - -Commands: - update Download and install updates to rustup - uninstall Uninstall rustup - upgrade-data Upgrade the internal data format - help Print this message or the help of the given subcommand(s) - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_self_cmd_uninstall_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_self_cmd_uninstall_cmd_help_flag_stdout.toml deleted file mode 100644 index 1a420ff446..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_self_cmd_uninstall_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,13 +0,0 @@ -bin.name = "rustup" -args = ["self", "uninstall", "--help"] -stdout = """ -... -Uninstall rustup - -Usage: rustup[EXE] self uninstall [OPTIONS] - -Options: - -y - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_self_cmd_update_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_self_cmd_update_cmd_help_flag_stdout.toml deleted file mode 100644 index 90ffe32d71..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_self_cmd_update_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,12 +0,0 @@ -bin.name = "rustup" -args = ["self", "update", "--help"] -stdout = """ -... -Download and install updates to rustup - -Usage: rustup[EXE] self update - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_self_cmd_upgrade-data _cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_self_cmd_upgrade-data _cmd_help_flag_stdout.toml deleted file mode 100644 index 590616e25e..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_self_cmd_upgrade-data _cmd_help_flag_stdout.toml +++ /dev/null @@ -1,12 +0,0 @@ -bin.name = "rustup" -args = ["self", "upgrade-data", "--help"] -stdout = """ -... -Upgrade the internal data format - -Usage: rustup[EXE] self upgrade-data - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_set_cmd_auto-install_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_set_cmd_auto-install_cmd_help_flag_stdout.toml deleted file mode 100644 index 6e5d088d8e..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_set_cmd_auto-install_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,15 +0,0 @@ -bin.name = "rustup" -args = ["set", "auto-install", "--help"] -stdout = """ -... -The auto toolchain install mode - -Usage: rustup[EXE] set auto-install [AUTO_INSTALL_MODE] - -Arguments: - [AUTO_INSTALL_MODE] [default: enable] [possible values: enable, disable] - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_set_cmd_auto-self-update_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_set_cmd_auto-self-update_cmd_help_flag_stdout.toml deleted file mode 100644 index 021708b0cb..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_set_cmd_auto-self-update_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,15 +0,0 @@ -bin.name = "rustup" -args = ["set", "auto-self-update", "--help"] -stdout = """ -... -The rustup auto self update mode - -Usage: rustup[EXE] set auto-self-update [AUTO_SELF_UPDATE_MODE] - -Arguments: - [AUTO_SELF_UPDATE_MODE] [default: enable] [possible values: enable, disable, check-only] - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_set_cmd_default-host_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_set_cmd_default-host_cmd_help_flag_stdout.toml deleted file mode 100644 index 74fef3a8a0..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_set_cmd_default-host_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,15 +0,0 @@ -bin.name = "rustup" -args = ["set", "default-host", "--help"] -stdout = """ -... -The triple used to identify toolchains when not specified - -Usage: rustup[EXE] set default-host - -Arguments: - - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_set_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_set_cmd_help_flag_stdout.toml deleted file mode 100644 index 5424741e8c..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_set_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,19 +0,0 @@ -bin.name = "rustup" -args = ["set", "--help"] -stdout = """ -... -Alter rustup settings - -Usage: rustup[EXE] set - -Commands: - default-host The triple used to identify toolchains when not specified - profile The default components installed with a toolchain - auto-self-update The rustup auto self update mode - auto-install The auto toolchain install mode - help Print this message or the help of the given subcommand(s) - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_set_cmd_profile_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_set_cmd_profile_cmd_help_flag_stdout.toml deleted file mode 100644 index 15939409dd..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_set_cmd_profile_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,15 +0,0 @@ -bin.name = "rustup" -args = ["set", "profile", "--help"] -stdout = """ -... -The default components installed with a toolchain - -Usage: rustup[EXE] set profile [PROFILE_NAME] - -Arguments: - [PROFILE_NAME] [default: default] [possible values: minimal, default, complete] - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml deleted file mode 100644 index d06aab867e..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,22 +0,0 @@ -bin.name = "rustup" -args = ["show", "active-toolchain", "--help"] -stdout = """ -... -Show the active toolchain - -Usage: rustup[EXE] show active-toolchain [OPTIONS] - -Options: - -v, --verbose Enable verbose output with rustc information - -h, --help Print help - -Discussion: - Shows the name of the active toolchain. - - This is useful for figuring out the active tool chain from - scripts. - - You should use `rustc --print sysroot` to get the sysroot, or - `rustc --version` to get the toolchain version. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_show_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_show_cmd_help_flag_stdout.toml deleted file mode 100644 index 6f2e81e48e..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_show_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,28 +0,0 @@ -bin.name = "rustup" -args = ["show", "--help"] -stdout = """ -... -Show the active and installed toolchains or profiles - -Usage: rustup[EXE] show [OPTIONS] [COMMAND] - -Commands: - active-toolchain Show the active toolchain - home Display the computed value of RUSTUP_HOME - profile Show the default profile used for the `rustup install` command - help Print this message or the help of the given subcommand(s) - -Options: - -v, --verbose Enable verbose output with rustc information for all installed toolchains - -h, --help Print help - -Discussion: - Shows the name of the active toolchain and the version of `rustc`. - - If the active toolchain has installed support for additional - compilation targets, then they are listed as well. - - If there are multiple toolchains installed then all installed - toolchains are listed as well. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_show_cmd_home_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_show_cmd_home_cmd_help_flag_stdout.toml deleted file mode 100644 index 6283c5e97a..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_show_cmd_home_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,12 +0,0 @@ -bin.name = "rustup" -args = ["show", "home", "--help"] -stdout = """ -... -Display the computed value of RUSTUP_HOME - -Usage: rustup[EXE] show home - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_show_cmd_profile_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_show_cmd_profile_cmd_help_flag_stdout.toml deleted file mode 100644 index e814a1f9c3..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_show_cmd_profile_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,12 +0,0 @@ -bin.name = "rustup" -args = ["show", "profile", "--help"] -stdout = """ -... -Show the default profile used for the `rustup install` command - -Usage: rustup[EXE] show profile - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_target_cmd_add_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_target_cmd_add_cmd_help_flag_stdout.toml deleted file mode 100644 index 302c4a06e9..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_target_cmd_add_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,17 +0,0 @@ -bin.name = "rustup" -args = ["target", "add", "--help"] -stdout = """ -... -Add a target to a Rust toolchain - -Usage: rustup[EXE] target add [OPTIONS] ... - -Arguments: - ... List of targets to install; \"all\" installs all available targets - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_target_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_target_cmd_help_flag_stdout.toml deleted file mode 100644 index c5ed7dca27..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_target_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,18 +0,0 @@ -bin.name = "rustup" -args = ["target", "--help"] -stdout = """ -... -Modify a toolchain's supported targets - -Usage: rustup[EXE] target - -Commands: - list List installed and available targets - add Add a target to a Rust toolchain - remove Remove a target from a Rust toolchain - help Print this message or the help of the given subcommand(s) - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_target_cmd_list_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_target_cmd_list_cmd_help_flag_stdout.toml deleted file mode 100644 index 52f8a98508..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_target_cmd_list_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,16 +0,0 @@ -bin.name = "rustup" -args = ["target", "list", "--help"] -stdout = """ -... -List installed and available targets - -Usage: rustup[EXE] target list [OPTIONS] - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - --installed List only installed targets - -q, --quiet Force the output to be a single column - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_target_cmd_remove_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_target_cmd_remove_cmd_help_flag_stdout.toml deleted file mode 100644 index 64cdd2ab99..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_target_cmd_remove_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,17 +0,0 @@ -bin.name = "rustup" -args = ["target", "remove", "--help"] -stdout = """ -... -Remove a target from a Rust toolchain - -Usage: rustup[EXE] target remove [OPTIONS] ... - -Arguments: - ... List of targets to uninstall - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more - information see `rustup help toolchain` - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_help_flag_stdout.toml deleted file mode 100644 index 2e109e0fe0..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,63 +0,0 @@ -bin.name = "rustup" -args = ["toolchain", "--help"] -stdout = """ -... -Install, uninstall, or list toolchains - -Usage: rustup[EXE] toolchain - -Commands: - list List installed toolchains - install Install or update the given toolchains, or by default the active toolchain - uninstall Uninstall the given toolchains - link Create a custom toolchain by symlinking to a directory - help Print this message or the help of the given subcommand(s) - -Options: - -h, --help Print help - -Discussion: - Many `rustup` commands deal with *toolchains*, a single - installation of the Rust compiler. `rustup` supports multiple - types of toolchains. The most basic track the official release - channels: 'stable', 'beta' and 'nightly'; but `rustup` can also - install specific toolchains from the official archives, toolchains for - alternate host platforms, and from local builds ('custom toolchains'). - - Standard release channel toolchain names have the following form: - - [-][-] - - = stable|beta|nightly|[-] - = | - = beta[.] - = YYYY-MM-DD - = - - 'channel' is a named release channel, a major and minor version - number such as `1.42`, or a fully specified version number, such - as `1.42.0`. Channel names can be optionally appended with an - archive date, as in `nightly-2014-12-18`, in which case the - toolchain is downloaded from the archive for that date. - - The host may be specified as a target triple. This is most useful - for installing a 32-bit compiler on a 64-bit platform, or for - installing the [MSVC-based toolchain] on Windows. For example: - - $ rustup toolchain install stable-x86_64-pc-windows-msvc - - For convenience, omitted elements of the target triple will be - inferred, so the above could be written: - - $ rustup toolchain install stable-msvc - - The `rustup default` command may be used to both install and set - the desired toolchain as default in a single command: - - $ rustup default stable-msvc - - rustup can also manage symlinked local toolchain builds, which are - often used for developing Rust itself. For more information see - `rustup toolchain help link`. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_install_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_install_cmd_help_flag_stdout.toml deleted file mode 100644 index 1e398f09ab..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_install_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,25 +0,0 @@ -bin.name = "rustup" -args = ["toolchain", "install", "--help"] -stdout = """ -Install or update the given toolchains, or by default the active toolchain - -Usage: rustup[EXE] toolchain install [OPTIONS] [TOOLCHAIN]... - -Arguments: - [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see - `rustup help toolchain` - -Options: - --profile [possible values: minimal, default, complete] - -c, --component Comma-separated list of components to be added on installation - -t, --target Comma-separated list of targets to be added on installation - --no-self-update Don't perform self update when running the `rustup toolchain install` - command - --force Force an update, even if some components are missing - --allow-downgrade Allow rustup to downgrade the toolchain to satisfy your component - choice - --force-non-host Install toolchains that require an emulator. See - https://github.com/rust-lang/rustup/wiki/Non-host-toolchains - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_link_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_link_cmd_help_flag_stdout.toml deleted file mode 100644 index e0f084f02c..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_link_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,37 +0,0 @@ -bin.name = "rustup" -args = ["toolchain", "link", "--help"] -stdout = """ -... -Create a custom toolchain by symlinking to a directory - -Usage: rustup[EXE] toolchain link - -Arguments: - Custom toolchain name - Path to the directory - -Options: - -h, --help Print help - -Discussion: - 'toolchain' is the custom name to be assigned to the new toolchain. - Any name is permitted as long as: - - it does not include '/' or '/' except as the last character - - it is not equal to 'none' - - it does not fully match an initialsubstring of a standard release channel. - For example, you can use the names 'latest' or '2017-04-01' but you cannot - use 'stable' or 'beta-i686' or 'nightly-x86_64-unknown-linux-gnu'. - - 'path' specifies the directory where the binaries and libraries for - the custom toolchain can be found. For example, when used for - development of Rust itself, toolchains can be linked directly out of - the build directory. After building, you can test out different - compiler versions as follows: - - $ rustup toolchain link latest-stage1 build/x86_64-unknown-linux-gnu/stage1 - $ rustup override set latest-stage1 - - If you now compile a crate in the current directory, the custom - toolchain 'latest-stage1' will be used. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_list_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_list_cmd_help_flag_stdout.toml deleted file mode 100644 index ea6eff1bfd..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_list_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,14 +0,0 @@ -bin.name = "rustup" -args = ["toolchain", "list", "--help"] -stdout = """ -... -List installed toolchains - -Usage: rustup[EXE] toolchain list [OPTIONS] - -Options: - -v, --verbose Enable verbose output with toolchain information - -q, --quiet Force the output to be a single column - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_uninstall_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_uninstall_cmd_help_flag_stdout.toml deleted file mode 100644 index 40fb0fdbf7..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_toolchain_cmd_uninstall_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,15 +0,0 @@ -bin.name = "rustup" -args = ["toolchain", "uninstall", "--help"] -stdout = """ -Uninstall the given toolchains - -Usage: rustup[EXE] toolchain uninstall ... - -Arguments: - ... Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name. - For more information see `rustup help toolchain` - -Options: - -h, --help Print help -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_unknown_arg_stdout.toml b/tests/suite/cli-ui/rustup/rustup_unknown_arg_stdout.toml deleted file mode 100644 index aaa0365373..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_unknown_arg_stdout.toml +++ /dev/null @@ -1,9 +0,0 @@ -bin.name = "rustup" -args = ["random"] -status.code = 1 -stdout = "" -stderr = """ -error: invalid value 'random' for '[+toolchain]': error: \"random\" is not a valid subcommand, so it was interpreted as a toolchain name, but it is also invalid. To override the toolchain using the 'rustup +toolchain' syntax, make sure to prefix the toolchain override with a '+' - -For more information, try '--help'. -""" diff --git a/tests/suite/cli-ui/rustup/rustup_up_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_up_cmd_help_flag_stdout.toml deleted file mode 100644 index 2710d20a55..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_up_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,28 +0,0 @@ -bin.name = "rustup" -args = ["up", "--help"] -stdout = """ -... -Update Rust toolchains and rustup - -Usage: rustup[EXE] update [OPTIONS] [TOOLCHAIN]... - -Arguments: - [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see - `rustup help toolchain` - -Options: - --no-self-update Don't perform self update when running the `rustup update` command - --force Force an update, even if some components are missing - --force-non-host Install toolchains that require an emulator. See - https://github.com/rust-lang/rustup/wiki/Non-host-toolchains - -h, --help Print help - -Discussion: - With no toolchain specified, the `update` command updates each of - the installed toolchains from the official release channels, then - updates rustup itself. - - If given a toolchain argument then `update` updates that - toolchain, the same as `rustup toolchain install`. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_update_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_update_cmd_help_flag_stdout.toml deleted file mode 100644 index ce1a69e5fd..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_update_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,28 +0,0 @@ -bin.name = "rustup" -args = ["update", "--help"] -stdout = """ -... -Update Rust toolchains and rustup - -Usage: rustup[EXE] update [OPTIONS] [TOOLCHAIN]... - -Arguments: - [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see - `rustup help toolchain` - -Options: - --no-self-update Don't perform self update when running the `rustup update` command - --force Force an update, even if some components are missing - --force-non-host Install toolchains that require an emulator. See - https://github.com/rust-lang/rustup/wiki/Non-host-toolchains - -h, --help Print help - -Discussion: - With no toolchain specified, the `update` command updates each of - the installed toolchains from the official release channels, then - updates rustup itself. - - If given a toolchain argument then `update` updates that - toolchain, the same as `rustup toolchain install`. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_upgrade_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_upgrade_cmd_help_flag_stdout.toml deleted file mode 100644 index 1c91e425a5..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_upgrade_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,28 +0,0 @@ -bin.name = "rustup" -args = ["upgrade", "--help"] -stdout = """ -... -Update Rust toolchains and rustup - -Usage: rustup[EXE] update [OPTIONS] [TOOLCHAIN]... - -Arguments: - [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see - `rustup help toolchain` - -Options: - --no-self-update Don't perform self update when running the `rustup update` command - --force Force an update, even if some components are missing - --force-non-host Install toolchains that require an emulator. See - https://github.com/rust-lang/rustup/wiki/Non-host-toolchains - -h, --help Print help - -Discussion: - With no toolchain specified, the `update` command updates each of - the installed toolchains from the official release channels, then - updates rustup itself. - - If given a toolchain argument then `update` updates that - toolchain, the same as `rustup toolchain install`. -""" -stderr = "" diff --git a/tests/suite/cli-ui/rustup/rustup_which_cmd_help_flag_stdout.toml b/tests/suite/cli-ui/rustup/rustup_which_cmd_help_flag_stdout.toml deleted file mode 100644 index 77f0163398..0000000000 --- a/tests/suite/cli-ui/rustup/rustup_which_cmd_help_flag_stdout.toml +++ /dev/null @@ -1,17 +0,0 @@ -args = ["which", "--help"] -bin.name = "rustup" -stderr = "" -stdout = """ -... -Display which binary will be run for a given command - -Usage: rustup[EXE] which [OPTIONS] - -Arguments: - - -Options: - --toolchain Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom - toolchain name. For more information see `rustup help toolchain` - -h, --help Print help -""" diff --git a/tests/suite/cli_rustup_init_ui.rs b/tests/suite/cli_rustup_init_ui.rs new file mode 100644 index 0000000000..bd6f2a59fc --- /dev/null +++ b/tests/suite/cli_rustup_init_ui.rs @@ -0,0 +1,64 @@ +use std::fs::create_dir_all; +use std::path::Path; + +use snapbox::Data; +use snapbox::cmd::{Command, cargo_bin}; + +#[track_caller] +fn test_help(name: &str, args: &[&str]) { + let home = Path::new(env!("CARGO_TARGET_TMPDIR")).join("home-ro"); + create_dir_all(&home).unwrap(); + + let rustup_init = cargo_bin!("rustup-init"); + Command::new(rustup_init) + .env("RUSTUP_TERM_COLOR", "always") + // once installed rustup asserts the presence of ~/.rustup/settings.toml if + // Config is instantiated. + .env("HOME", &home) + .args(args) + .assert() + .success() + .stdout_eq(Data::read_from( + Path::new(&format!( + "tests/suite/cli_rustup_init_ui/{name}.stdout.term.svg" + )), + None, + )) + .stderr_eq(""); +} + +#[track_caller] +#[cfg(not(target_os = "windows"))] // On windows, we don't use rustup-init.sh +fn test_sh_help(name: &str, args: &[&str]) { + let home = Path::new(env!("CARGO_TARGET_TMPDIR")).join("home-ro"); + create_dir_all(&home).unwrap(); + + let project_root = Path::new(env!("CARGO_MANIFEST_DIR")); + let rustup_init_sh = project_root.join("rustup-init.sh"); + Command::new(rustup_init_sh) + .env("RUSTUP_TERM_COLOR", "always") + // once installed rustup asserts the presence of ~/.rustup/settings.toml if + // Config is instantiated. + .env("HOME", &home) + .args(args) + .assert() + .success() + .stdout_eq(Data::read_from( + Path::new(&format!( + "tests/suite/cli_rustup_init_ui/{name}.stdout.term.svg" + )), + None, + )) + .stderr_eq(""); +} + +#[test] +fn rustup_init_help_flag() { + test_help("rustup_init_help_flag", &["--help"]); +} + +#[test] +#[cfg(not(target_os = "windows"))] // On windows, we don't use rustup-init.sh +fn rustup_init_sh_help_flag() { + test_sh_help("rustup_init_sh_help_flag", &["--help"]); +} diff --git a/tests/suite/cli_rustup_init_ui/rustup_init_help_flag.stdout.term.svg b/tests/suite/cli_rustup_init_ui/rustup_init_help_flag.stdout.term.svg new file mode 100644 index 0000000000..8c5ab89742 --- /dev/null +++ b/tests/suite/cli_rustup_init_ui/rustup_init_help_flag.stdout.term.svg @@ -0,0 +1,85 @@ + + + + + + + rustup-init [..] + + + + The installer for rustup + + + + Usage: rustup-init[EXE] [OPTIONS] + + + + Options: + + -v, --verbose + + Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset + + -q, --quiet + + Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset + + -y + + Disable confirmation prompt + + --default-host <DEFAULT_HOST> + + Choose a default host triple + + --default-toolchain <DEFAULT_TOOLCHAIN> + + Choose a default toolchain to install. Use 'none' to not install any toolchains at all + + --profile <PROFILE> + + [default: default] [possible values: minimal, default, complete] + + -c, --component <COMPONENT> + + Comma-separated list of component names to also install + + -t, --target <TARGET> + + Comma-separated list of target names to also install + + --no-update-default-toolchain + + Don't update any existing default toolchain after install + + --no-modify-path + + Don't configure the PATH environment variable + + -h, --help + + Print help + + -V, --version + + Print version + + + + + + diff --git a/tests/suite/cli_rustup_init_ui/rustup_init_sh_help_flag.stdout.term.svg b/tests/suite/cli_rustup_init_ui/rustup_init_sh_help_flag.stdout.term.svg new file mode 100644 index 0000000000..76751150ef --- /dev/null +++ b/tests/suite/cli_rustup_init_ui/rustup_init_sh_help_flag.stdout.term.svg @@ -0,0 +1,85 @@ + + + + + + + rustup-init 1.28.2 (d1f31992a 2025-04-28) + + + + The installer for rustup + + + + Usage: rustup-init[EXE] [OPTIONS] + + + + Options: + + -v, --verbose + + Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset + + -q, --quiet + + Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset + + -y + + Disable confirmation prompt + + --default-host <DEFAULT_HOST> + + Choose a default host triple + + --default-toolchain <DEFAULT_TOOLCHAIN> + + Choose a default toolchain to install. Use 'none' to not install any toolchains at all + + --profile <PROFILE> + + [default: default] [possible values: minimal, default, complete] + + -c, --component <COMPONENT> + + Comma-separated list of component names to also install + + -t, --target <TARGET> + + Comma-separated list of target names to also install + + --no-update-default-toolchain + + Don't update any existing default toolchain after install + + --no-modify-path + + Don't configure the PATH environment variable + + -h, --help + + Print help + + -V, --version + + Print version + + + + + + diff --git a/tests/suite/cli_rustup_ui.rs b/tests/suite/cli_rustup_ui.rs new file mode 100644 index 0000000000..b48971939f --- /dev/null +++ b/tests/suite/cli_rustup_ui.rs @@ -0,0 +1,361 @@ +use std::fs::create_dir_all; +use std::path::Path; + +use snapbox::Data; +use snapbox::cmd::{Command, cargo_bin}; + +#[track_caller] +fn test_help(name: &str, args: &[&str]) { + let home = Path::new(env!("CARGO_TARGET_TMPDIR")).join("home-ro"); + create_dir_all(&home).unwrap(); + + let rustup_init = cargo_bin!("rustup-init"); + Command::new(rustup_init) + .env("RUSTUP_FORCE_ARG0", "rustup") + .env("RUSTUP_TERM_COLOR", "always") + // once installed rustup asserts the presence of ~/.rustup/settings.toml if + // Config is instantiated. + .env("HOME", &home) + .args(args) + .assert() + .success() + .stdout_eq(Data::read_from( + Path::new(&format!("tests/suite/cli_rustup_ui/{name}.stdout.term.svg")), + None, + )) + .stderr_eq(""); +} + +#[track_caller] +fn test_error(name: &str, args: &[&str]) { + let home = Path::new(env!("CARGO_TARGET_TMPDIR")).join("home-ro"); + create_dir_all(&home).unwrap(); + + let rustup_init = cargo_bin!("rustup-init"); + Command::new(rustup_init) + .env("RUSTUP_FORCE_ARG0", "rustup") + .env("RUSTUP_TERM_COLOR", "always") + // once installed rustup asserts the presence of ~/.rustup/settings.toml if + // Config is instantiated. + .env("HOME", &home) + .args(args) + .assert() + .failure() + .stdout_eq("") + .stderr_eq(Data::read_from( + Path::new(&format!("tests/suite/cli_rustup_ui/{name}.stderr.term.svg")), + None, + )); +} + +#[test] +#[cfg(not(windows))] // On windows, we don't have the `man` command +fn rustup_help_cmd() { + test_help("rustup_help_cmd", &["help"]); +} + +#[test] +#[cfg(not(windows))] // On windows, we don't have the `man` command +fn rustup_help_flag() { + test_help("rustup_help_flag", &["--help"]); +} + +#[test] +#[cfg(not(windows))] // On windows, we don't have the `man` command +fn rustup_only_options() { + test_error("rustup_only_options", &["-q"]); +} + +#[test] +fn rustup_check_cmd_help_flag() { + test_help("rustup_check_cmd_help_flag", &["check", "--help"]); +} + +#[test] +fn rustup_completions_cmd_help_flag() { + test_help( + "rustup_completions_cmd_help_flag", + &["completions", "--help"], + ); +} + +#[test] +fn rustup_component_cmd_help_flag() { + test_help("rustup_component_cmd_help_flag", &["component", "--help"]); +} + +#[test] +fn rustup_component_cmd_add_cmd_help_flag() { + test_help( + "rustup_component_cmd_add_cmd_help_flag", + &["component", "add", "--help"], + ); +} + +#[test] +fn rustup_component_cmd_list_cmd_help_flag() { + test_help( + "rustup_component_cmd_list_cmd_help_flag", + &["component", "list", "--help"], + ); +} + +#[test] +fn rustup_component_cmd_remove_cmd_help_flag() { + test_help( + "rustup_component_cmd_remove_cmd_help_flag", + &["component", "remove", "--help"], + ); +} + +#[test] +fn rustup_default_cmd_help_flag() { + test_help("rustup_default_cmd_help_flag", &["default", "--help"]); +} + +#[test] +fn rustup_doc_cmd_help_flag() { + test_help("rustup_doc_cmd_help_flag", &["doc", "--help"]); +} + +#[test] +#[cfg(not(target_os = "windows"))] // On windows, we don't have man command +fn rustup_man_cmd_help_flag() { + test_help("rustup_man_cmd_help_flag", &["man", "--help"]); +} + +#[test] +fn rustup_override_cmd_help_flag() { + test_help("rustup_override_cmd_help_flag", &["override", "--help"]); +} + +#[test] +fn rustup_override_cmd_add_cmd_help_flag() { + test_help( + "rustup_override_cmd_add_cmd_help_flag", + &["override", "add", "--help"], + ); +} + +#[test] +fn rustup_override_cmd_list_cmd_help_flag() { + test_help( + "rustup_override_cmd_list_cmd_help_flag", + &["override", "list", "--help"], + ); +} + +#[test] +fn rustup_override_cmd_remove_cmd_help_flag() { + test_help( + "rustup_override_cmd_remove_cmd_help_flag", + &["override", "remove", "--help"], + ); +} + +#[test] +fn rustup_override_cmd_set_cmd_help_flag() { + test_help( + "rustup_override_cmd_set_cmd_help_flag", + &["override", "set", "--help"], + ); +} + +#[test] +fn rustup_override_cmd_unset_cmd_help_flag() { + test_help( + "rustup_override_cmd_unset_cmd_help_flag", + &["override", "unset", "--help"], + ); +} + +#[test] +fn rustup_run_cmd_help_flag() { + test_help("rustup_run_cmd_help_flag", &["run", "--help"]); +} + +#[test] +fn rustup_self_cmd_help_flag() { + test_help("rustup_self_cmd_help_flag", &["self", "--help"]); +} + +#[test] +fn rustup_self_cmd_uninstall_cmd_help_flag() { + test_help( + "rustup_self_cmd_uninstall_cmd_help_flag", + &["self", "uninstall", "--help"], + ); +} + +#[test] +fn rustup_self_cmd_update_cmd_help_flag() { + test_help( + "rustup_self_cmd_update_cmd_help_flag", + &["self", "update", "--help"], + ); +} + +#[test] +fn rustup_self_cmd_upgrade_data_cmd_help_flag() { + test_help( + "rustup_self_cmd_upgrade_data_cmd_help_flag", + &["self", "upgrade-data", "--help"], + ); +} + +#[test] +fn rustup_set_cmd_help_flag() { + test_help("rustup_set_cmd_help_flag", &["set", "--help"]); +} + +#[test] +fn rustup_set_cmd_auto_install_cmd_help_flag() { + test_help( + "rustup_set_cmd_auto_install_cmd_help_flag", + &["set", "auto-install", "--help"], + ); +} + +#[test] +fn rustup_set_cmd_auto_self_update_cmd_help_flag() { + test_help( + "rustup_set_cmd_auto_self_update_cmd_help_flag", + &["set", "auto-self-update", "--help"], + ); +} + +#[test] +fn rustup_set_cmd_default_host_cmd_help_flag() { + test_help( + "rustup_set_cmd_default_host_cmd_help_flag", + &["set", "default-host", "--help"], + ); +} + +#[test] +fn rustup_set_cmd_profile_cmd_help_flag() { + test_help( + "rustup_set_cmd_profile_cmd_help_flag", + &["set", "profile", "--help"], + ); +} + +#[test] +fn rustup_show_cmd_help_flag() { + test_help("rustup_show_cmd_help_flag", &["show", "--help"]); +} + +#[test] +fn rustup_show_cmd_active_toolchain_cmd_help_flag() { + test_help( + "rustup_show_cmd_active_toolchain_cmd_help_flag", + &["show", "active-toolchain", "--help"], + ); +} + +#[test] +fn rustup_show_cmd_home_cmd_help_flag() { + test_help( + "rustup_show_cmd_home_cmd_help_flag", + &["show", "home", "--help"], + ); +} + +#[test] +fn rustup_show_cmd_profile_cmd_help_flag() { + test_help( + "rustup_show_cmd_profile_cmd_help_flag", + &["show", "profile", "--help"], + ); +} + +#[test] +fn rustup_target_cmd_help_flag() { + test_help("rustup_target_cmd_help_flag", &["target", "--help"]); +} + +#[test] +fn rustup_target_cmd_add_cmd_help_flag() { + test_help( + "rustup_target_cmd_add_cmd_help_flag", + &["target", "add", "--help"], + ); +} + +#[test] +fn rustup_target_cmd_list_cmd_help_flag() { + test_help( + "rustup_target_cmd_list_cmd_help_flag", + &["target", "list", "--help"], + ); +} + +#[test] +fn rustup_target_cmd_remove_cmd_help_flag() { + test_help( + "rustup_target_cmd_remove_cmd_help_flag", + &["target", "remove", "--help"], + ); +} + +#[test] +fn rustup_toolchain_cmd_help_flag() { + test_help("rustup_toolchain_cmd_help_flag", &["toolchain", "--help"]); +} + +#[test] +fn rustup_toolchain_cmd_install_cmd_help_flag() { + test_help( + "rustup_toolchain_cmd_install_cmd_help_flag", + &["toolchain", "install", "--help"], + ); +} + +#[test] +fn rustup_toolchain_cmd_link_cmd_help_flag() { + test_help( + "rustup_toolchain_cmd_link_cmd_help_flag", + &["toolchain", "link", "--help"], + ); +} + +#[test] +fn rustup_toolchain_cmd_list_cmd_help_flag() { + test_help( + "rustup_toolchain_cmd_list_cmd_help_flag", + &["toolchain", "list", "--help"], + ); +} + +#[test] +fn rustup_toolchain_cmd_uninstall_cmd_help_flag() { + test_help( + "rustup_toolchain_cmd_uninstall_cmd_help_flag", + &["toolchain", "uninstall", "--help"], + ); +} + +#[test] +fn rustup_up_cmd_help_flag() { + test_help("rustup_up_cmd_help_flag", &["up", "--help"]); +} + +#[test] +fn rustup_update_cmd_help_flag() { + test_help("rustup_update_cmd_help_flag", &["update", "--help"]); +} + +#[test] +fn rustup_upgrade_cmd_help_flag() { + test_help("rustup_upgrade_cmd_help_flag", &["upgrade", "--help"]); +} + +#[test] +fn rustup_which_cmd_help_flag() { + test_help("rustup_which_cmd_help_flag", &["which", "--help"]); +} + +#[test] +fn rustup_unknown_arg() { + test_error("rustup_unknown_arg", &["random"]); +} diff --git a/tests/suite/cli_rustup_ui/rustup_check_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_check_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..e31a7a062d --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_check_cmd_help_flag.stdout.term.svg @@ -0,0 +1,37 @@ + + + + + + + Check for updates to Rust toolchains and rustup + + + + Usage: rustup[EXE] check [OPTIONS] + + + + Options: + + --no-self-update Don't check for self update when running the `rustup check` command + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_completions_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_completions_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..7c99ae5e24 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_completions_cmd_help_flag.stdout.term.svg @@ -0,0 +1,285 @@ + + + + + + + Generate tab-completion scripts for your shell + + + + Usage: rustup[EXE] completions <SHELL> [COMMAND] + + + + Arguments: + + <SHELL> [possible values: bash, elvish, fish, powershell, zsh] + + [COMMAND] [default: rustup] [possible values: rustup, cargo] + + + + Options: + + -h, --help Print help + + + + Discussion: + + Enable tab completion for Bash, Fish, Zsh, or PowerShell + + The script is output on `stdout`, allowing one to re-direct the + + output to the file of their choosing. Where you place the file + + will depend on which shell, and which operating system you are + + using. Your particular configuration may also determine where + + these scripts need to be placed. + + + + Here are some common set ups for the three supported shells under + + Unix and similar operating systems (such as GNU/Linux). + + + + Bash: + + + + Completion files are commonly stored in `/etc/bash_completion.d/` for + + system-wide commands, but can be stored in + + `~/.local/share/bash-completion/completions` for user-specific commands. + + Run the command: + + + + $ mkdir -p ~/.local/share/bash-completion/completions + + $ rustup completions bash > ~/.local/share/bash-completion/completions/rustup + + + + This installs the completion script. You may have to log out and + + log back in to your shell session for the changes to take effect. + + + + Bash (macOS/Homebrew): + + + + Homebrew stores bash completion files within the Homebrew directory. + + With the `bash-completion` brew formula installed, run the command: + + + + $ mkdir -p $(brew --prefix)/etc/bash_completion.d + + $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion + + + + Fish: + + + + Fish completion files are commonly stored in + + `$HOME/.config/fish/completions`. Run the command: + + + + $ mkdir -p ~/.config/fish/completions + + $ rustup completions fish > ~/.config/fish/completions/rustup.fish + + + + This installs the completion script. You may have to log out and + + log back in to your shell session for the changes to take effect. + + + + Zsh: + + + + ZSH completions are commonly stored in any directory listed in + + your `$fpath` variable. To use these completions, you must either + + add the generated script to one of those directories, or add your + + own to this list. + + + + Adding a custom directory is often the safest bet if you are + + unsure of which directory to use. First create the directory; for + + this example we'll create a hidden directory inside our `$HOME` + + directory: + + + + $ mkdir ~/.zfunc + + + + Then add the following lines to your `.zshrc` just before + + `compinit`: + + + + fpath+=~/.zfunc + + + + Now you can install the completions script using the following + + command: + + + + $ rustup completions zsh > ~/.zfunc/_rustup + + + + You must then either log out and log back in, or simply run + + + + $ exec zsh + + + + for the new completions to take effect. + + + + Custom locations: + + + + Alternatively, you could save these files to the place of your + + choosing, such as a custom directory inside your $HOME. Doing so + + will require you to add the proper directives, such as `source`ing + + inside your login script. Consult your shells documentation for + + how to add such directives. + + + + PowerShell: + + + + The powershell completion scripts require PowerShell v5.0+ (which + + comes with Windows 10, but can be downloaded separately for windows 7 + + or 8.1). + + + + First, check if a profile has already been set + + + + PS C:/> Test-Path $profile + + + + If the above command returns `False` run the following + + + + PS C:/> New-Item -path $profile -type file -force + + + + Now open the file provided by `$profile` (if you used the + + `New-Item` command it will be + + `${env:USERPROFILE}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1` + + + + Next, we either save the completions file into our profile, or + + into a separate file and source it inside our profile. To save the + + completions into our profile simply use + + + + PS C:/> rustup completions powershell >> + + ${env:USERPROFILE}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 + + + + Cargo: + + + + Rustup can also generate a completion script for `cargo`. The script output + + by `rustup` will source the completion script distributed with your default + + toolchain. Not all shells are currently supported. Here are examples for + + the currently supported shells. + + + + Bash: + + + + $ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo + + + + Zsh: + + + + $ rustup completions zsh cargo > ~/.zfunc/_cargo + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_component_cmd_add_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_component_cmd_add_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..35072834ad --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_component_cmd_add_cmd_help_flag.stdout.term.svg @@ -0,0 +1,47 @@ + + + + + + + Add a component to a Rust toolchain + + + + Usage: rustup[EXE] component add [OPTIONS] <COMPONENT>... + + + + Arguments: + + <COMPONENT>... + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + --target <TARGET> + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_component_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_component_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..dced96c821 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_component_cmd_help_flag.stdout.term.svg @@ -0,0 +1,47 @@ + + + + + + + Modify a toolchain's installed components + + + + Usage: rustup[EXE] component <COMMAND> + + + + Commands: + + list List installed and available components + + add Add a component to a Rust toolchain + + remove Remove a component from a Rust toolchain + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_component_cmd_list_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_component_cmd_list_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..1fcb8452b1 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_component_cmd_list_cmd_help_flag.stdout.term.svg @@ -0,0 +1,43 @@ + + + + + + + List installed and available components + + + + Usage: rustup[EXE] component list [OPTIONS] + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + --installed List only installed components + + -q, --quiet Force the output to be a single column + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_component_cmd_remove_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_component_cmd_remove_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..b3063c7216 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_component_cmd_remove_cmd_help_flag.stdout.term.svg @@ -0,0 +1,47 @@ + + + + + + + Remove a component from a Rust toolchain + + + + Usage: rustup[EXE] component remove [OPTIONS] <COMPONENT>... + + + + Arguments: + + <COMPONENT>... + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + --target <TARGET> + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_default_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_default_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..47d57cd633 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_default_cmd_help_flag.stdout.term.svg @@ -0,0 +1,55 @@ + + + + + + + Set the default toolchain + + + + Usage: rustup[EXE] default [OPTIONS] [TOOLCHAIN] + + + + Arguments: + + [TOOLCHAIN] 'none', a toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain + + name. For more information see `rustup help toolchain` + + + + Options: + + --force-non-host Install toolchains that require an emulator. See + + https://github.com/rust-lang/rustup/wiki/Non-host-toolchains + + -h, --help Print help + + + + Discussion: + + Sets the default toolchain to the one specified. If the toolchain + + is not already installed then it is installed first. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_doc_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_doc_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..7ba4774120 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_doc_cmd_help_flag.stdout.term.svg @@ -0,0 +1,105 @@ + + + + + + + Open the documentation for the current toolchain + + + + Usage: rustup[EXE] doc [OPTIONS] [TOPIC] + + + + Arguments: + + [TOPIC] Topic such as 'core', 'fn', 'usize', 'eprintln!', 'core::arch', 'alloc::format!', + + 'std::fs', 'std::fs::read_dir', 'std::io::Bytes', 'std::iter::Sum', + + 'std::io::error::Result' etc... + + + + Options: + + --path Only print the path to the documentation + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + --alloc The Rust core allocation and collections library + + --book The Rust Programming Language book + + --cargo The Cargo Book + + --clippy The Clippy Documentation + + --core The Rust Core Library + + --edition-guide The Rust Edition Guide + + --embedded-book The Embedded Rust Book + + --error-codes The Rust Error Codes Index + + --nomicon The Dark Arts of Advanced and Unsafe Rust Programming + + --proc_macro A support library for macro authors when defining new macros + + --reference The Rust Reference + + --rust-by-example A collection of runnable examples that illustrate various Rust + + concepts and standard libraries + + --rustc The compiler for the Rust programming language + + --rustdoc Documentation generator for Rust projects + + --std Standard library API documentation + + --style-guide The Rust Style Guide + + --test Support code for rustc's built in unit-test and micro-benchmarking + + framework + + --unstable-book The Unstable Book + + -h, --help Print help + + + + Discussion: + + Opens the documentation for the currently active toolchain with + + the default browser. + + + + By default, it opens the documentation index. Use the various + + flags to open specific pieces of documentation. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg new file mode 100644 index 0000000000..f91532b723 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_help_cmd.stdout.term.svg @@ -0,0 +1,107 @@ + + + + + + + rustup [..] + + + + The Rust toolchain installer + + + + Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND] + + + + Commands: + + toolchain Install, uninstall, or list toolchains + + default Set the default toolchain + + show Show the active and installed toolchains or profiles + + update Update Rust toolchains and rustup + + check Check for updates to Rust toolchains and rustup + + target Modify a toolchain's supported targets + + component Modify a toolchain's installed components + + override Modify toolchain overrides for directories + + run Run a command with an environment configured for a given toolchain + + which Display which binary will be run for a given command + + doc Open the documentation for the current toolchain + + man View the man page for a given command + + self Modify the rustup installation + + set Alter rustup settings + + completions Generate tab-completion scripts for your shell + + help Print this message or the help of the given subcommand(s) + + + + Arguments: + + [+toolchain] Release channel (e.g. +stable) or custom toolchain to set override + + + + Options: + + -v, --verbose Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset + + -q, --quiet Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset + + -h, --help Print help + + -V, --version Print version + + + + Discussion: + + Rustup installs The Rust Programming Language from the official + + release channels, enabling you to easily switch between stable, + + beta, and nightly compilers and keep them updated. It makes + + cross-compiling simpler with binary builds of the standard library + + for common platforms. + + + + If you are new to Rust consider running `rustup doc --book` to + + learn Rust. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_help_flag.stdout.term.svg new file mode 100644 index 0000000000..f91532b723 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_help_flag.stdout.term.svg @@ -0,0 +1,107 @@ + + + + + + + rustup [..] + + + + The Rust toolchain installer + + + + Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND] + + + + Commands: + + toolchain Install, uninstall, or list toolchains + + default Set the default toolchain + + show Show the active and installed toolchains or profiles + + update Update Rust toolchains and rustup + + check Check for updates to Rust toolchains and rustup + + target Modify a toolchain's supported targets + + component Modify a toolchain's installed components + + override Modify toolchain overrides for directories + + run Run a command with an environment configured for a given toolchain + + which Display which binary will be run for a given command + + doc Open the documentation for the current toolchain + + man View the man page for a given command + + self Modify the rustup installation + + set Alter rustup settings + + completions Generate tab-completion scripts for your shell + + help Print this message or the help of the given subcommand(s) + + + + Arguments: + + [+toolchain] Release channel (e.g. +stable) or custom toolchain to set override + + + + Options: + + -v, --verbose Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset + + -q, --quiet Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset + + -h, --help Print help + + -V, --version Print version + + + + Discussion: + + Rustup installs The Rust Programming Language from the official + + release channels, enabling you to easily switch between stable, + + beta, and nightly compilers and keep them updated. It makes + + cross-compiling simpler with binary builds of the standard library + + for common platforms. + + + + If you are new to Rust consider running `rustup doc --book` to + + learn Rust. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_man_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_man_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..5c5e24256b --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_man_cmd_help_flag.stdout.term.svg @@ -0,0 +1,45 @@ + + + + + + + View the man page for a given command + + + + Usage: rustup[EXE] man [OPTIONS] <COMMAND> + + + + Arguments: + + <COMMAND> + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_only_options.stderr.term.svg b/tests/suite/cli_rustup_ui/rustup_only_options.stderr.term.svg new file mode 100644 index 0000000000..20b8d2cfda --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_only_options.stderr.term.svg @@ -0,0 +1,125 @@ + + + + + + + rustup [..] + + + + The Rust toolchain installer + + + + Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND] + + + + Commands: + + toolchain Install, uninstall, or list toolchains + + default Set the default toolchain + + show Show the active and installed toolchains or profiles + + update Update Rust toolchains and rustup + + check Check for updates to Rust toolchains and rustup + + target Modify a toolchain's supported targets + + component Modify a toolchain's installed components + + override Modify toolchain overrides for directories + + run Run a command with an environment configured for a given toolchain + + which Display which binary will be run for a given command + + doc Open the documentation for the current toolchain + + man View the man page for a given command + + self Modify the rustup installation + + set Alter rustup settings + + completions Generate tab-completion scripts for your shell + + help Print this message or the help of the given subcommand(s) + + + + Arguments: + + [+toolchain] + + Release channel (e.g. +stable) or custom toolchain to set override + + + + Options: + + -v, --verbose + + Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset + + + + -q, --quiet + + Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset + + + + -h, --help + + Print help + + + + -V, --version + + Print version + + + + Discussion: + + Rustup installs The Rust Programming Language from the official + + release channels, enabling you to easily switch between stable, + + beta, and nightly compilers and keep them updated. It makes + + cross-compiling simpler with binary builds of the standard library + + for common platforms. + + + + If you are new to Rust consider running `rustup doc --book` to + + learn Rust. + + + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_override_cmd_add_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_override_cmd_add_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..ef965f6e37 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_override_cmd_add_cmd_help_flag.stdout.term.svg @@ -0,0 +1,45 @@ + + + + + + + Set the override toolchain for a directory + + + + Usage: rustup[EXE] override set [OPTIONS] <TOOLCHAIN> + + + + Arguments: + + <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name. For + + more information see `rustup help toolchain` + + + + Options: + + --path <PATH> Path to the directory + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_override_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_override_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..86455ce6c1 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_override_cmd_help_flag.stdout.term.svg @@ -0,0 +1,89 @@ + + + + + + + Modify toolchain overrides for directories + + + + Usage: rustup[EXE] override <COMMAND> + + + + Commands: + + list List directory toolchain overrides + + set Set the override toolchain for a directory + + unset Remove the override toolchain for a directory + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -h, --help Print help + + + + Discussion: + + Overrides configure Rustup to use a specific toolchain when + + running in a specific directory. + + + + Directories can be assigned their own Rust toolchain with `rustup + + override`. When a directory has an override then any time `rustc` + + or `cargo` is run inside that directory, or one of its child + + directories, the override toolchain will be invoked. + + + + To pin to a specific nightly: + + + + $ rustup override set nightly-2014-12-18 + + + + Or a specific stable release: + + + + $ rustup override set 1.0.0 + + + + To see the active toolchain use `rustup show`. To remove the + + override and use the default toolchain again, `rustup override + + unset`. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_override_cmd_list_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_override_cmd_list_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..673453986b --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_override_cmd_list_cmd_help_flag.stdout.term.svg @@ -0,0 +1,35 @@ + + + + + + + List directory toolchain overrides + + + + Usage: rustup[EXE] override list + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_override_cmd_remove_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_override_cmd_remove_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..ab53082bd4 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_override_cmd_remove_cmd_help_flag.stdout.term.svg @@ -0,0 +1,53 @@ + + + + + + + Remove the override toolchain for a directory + + + + Usage: rustup[EXE] override unset [OPTIONS] + + + + Options: + + --path <PATH> Path to the directory + + --nonexistent Remove override toolchain for all nonexistent directories + + -h, --help Print help + + + + Discussion: + + If `--path` argument is present, removes the override toolchain + + for the specified directory. If `--nonexistent` argument is + + present, removes the override toolchain for all nonexistent + + directories. Otherwise, removes the override toolchain for the + + current directory. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_override_cmd_set_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_override_cmd_set_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..ef965f6e37 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_override_cmd_set_cmd_help_flag.stdout.term.svg @@ -0,0 +1,45 @@ + + + + + + + Set the override toolchain for a directory + + + + Usage: rustup[EXE] override set [OPTIONS] <TOOLCHAIN> + + + + Arguments: + + <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name. For + + more information see `rustup help toolchain` + + + + Options: + + --path <PATH> Path to the directory + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_override_cmd_unset_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_override_cmd_unset_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..ab53082bd4 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_override_cmd_unset_cmd_help_flag.stdout.term.svg @@ -0,0 +1,53 @@ + + + + + + + Remove the override toolchain for a directory + + + + Usage: rustup[EXE] override unset [OPTIONS] + + + + Options: + + --path <PATH> Path to the directory + + --nonexistent Remove override toolchain for all nonexistent directories + + -h, --help Print help + + + + Discussion: + + If `--path` argument is present, removes the override toolchain + + for the specified directory. If `--nonexistent` argument is + + present, removes the override toolchain for all nonexistent + + directories. Otherwise, removes the override toolchain for the + + current directory. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_run_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_run_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..239ba2eb52 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_run_cmd_help_flag.stdout.term.svg @@ -0,0 +1,77 @@ + + + + + + + Run a command with an environment configured for a given toolchain + + + + Usage: rustup[EXE] run [OPTIONS] <TOOLCHAIN> <COMMAND>... + + + + Arguments: + + <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name, or + + an absolute path. For more information see `rustup help toolchain` + + <COMMAND>... + + + + Options: + + --install Install the requested toolchain if needed + + -h, --help Print help + + + + Discussion: + + Configures an environment to use the given toolchain and then runs + + the specified program. The command may be any program, not just + + rustc or cargo. This can be used for testing arbitrary toolchains + + without setting an override. + + + + Commands explicitly proxied by `rustup` (such as `rustc` and + + `cargo`) also have a shorthand for this available. The toolchain + + can be set by using `+toolchain` as the first argument. These are + + equivalent: + + + + $ cargo +nightly build + + + + $ rustup run nightly cargo build + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_self_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_self_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..f1bffcec92 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_self_cmd_help_flag.stdout.term.svg @@ -0,0 +1,47 @@ + + + + + + + Modify the rustup installation + + + + Usage: rustup[EXE] self <COMMAND> + + + + Commands: + + update Download and install updates to rustup + + uninstall Uninstall rustup + + upgrade-data Upgrade the internal data format + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_self_cmd_uninstall_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_self_cmd_uninstall_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..b3814a2758 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_self_cmd_uninstall_cmd_help_flag.stdout.term.svg @@ -0,0 +1,37 @@ + + + + + + + Uninstall rustup + + + + Usage: rustup[EXE] self uninstall [OPTIONS] + + + + Options: + + -y + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_self_cmd_update_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_self_cmd_update_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..3c241c4545 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_self_cmd_update_cmd_help_flag.stdout.term.svg @@ -0,0 +1,35 @@ + + + + + + + Download and install updates to rustup + + + + Usage: rustup[EXE] self update + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_self_cmd_upgrade_data_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_self_cmd_upgrade_data_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..00eb48d07a --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_self_cmd_upgrade_data_cmd_help_flag.stdout.term.svg @@ -0,0 +1,35 @@ + + + + + + + Upgrade the internal data format + + + + Usage: rustup[EXE] self upgrade-data + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_set_cmd_auto_install_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_set_cmd_auto_install_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..738dc17ffb --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_set_cmd_auto_install_cmd_help_flag.stdout.term.svg @@ -0,0 +1,41 @@ + + + + + + + The auto toolchain install mode + + + + Usage: rustup[EXE] set auto-install [AUTO_INSTALL_MODE] + + + + Arguments: + + [AUTO_INSTALL_MODE] [default: enable] [possible values: enable, disable] + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_set_cmd_auto_self_update_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_set_cmd_auto_self_update_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..16fdcbf7ab --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_set_cmd_auto_self_update_cmd_help_flag.stdout.term.svg @@ -0,0 +1,41 @@ + + + + + + + The rustup auto self update mode + + + + Usage: rustup[EXE] set auto-self-update [AUTO_SELF_UPDATE_MODE] + + + + Arguments: + + [AUTO_SELF_UPDATE_MODE] [default: enable] [possible values: enable, disable, check-only] + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_set_cmd_default_host_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_set_cmd_default_host_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..92aeca7ded --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_set_cmd_default_host_cmd_help_flag.stdout.term.svg @@ -0,0 +1,41 @@ + + + + + + + The triple used to identify toolchains when not specified + + + + Usage: rustup[EXE] set default-host <HOST_TRIPLE> + + + + Arguments: + + <HOST_TRIPLE> + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_set_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_set_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..2cd7580fdd --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_set_cmd_help_flag.stdout.term.svg @@ -0,0 +1,49 @@ + + + + + + + Alter rustup settings + + + + Usage: rustup[EXE] set <COMMAND> + + + + Commands: + + default-host The triple used to identify toolchains when not specified + + profile The default components installed with a toolchain + + auto-self-update The rustup auto self update mode + + auto-install The auto toolchain install mode + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_set_cmd_profile_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_set_cmd_profile_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..a3c19ff534 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_set_cmd_profile_cmd_help_flag.stdout.term.svg @@ -0,0 +1,41 @@ + + + + + + + The default components installed with a toolchain + + + + Usage: rustup[EXE] set profile [PROFILE_NAME] + + + + Arguments: + + [PROFILE_NAME] [default: default] [possible values: minimal, default, complete] + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_show_cmd_active_toolchain_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_show_cmd_active_toolchain_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..372fd7ebd7 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_show_cmd_active_toolchain_cmd_help_flag.stdout.term.svg @@ -0,0 +1,55 @@ + + + + + + + Show the active toolchain + + + + Usage: rustup[EXE] show active-toolchain [OPTIONS] + + + + Options: + + -v, --verbose Enable verbose output with rustc information + + -h, --help Print help + + + + Discussion: + + Shows the name of the active toolchain. + + + + This is useful for figuring out the active tool chain from + + scripts. + + + + You should use `rustc --print sysroot` to get the sysroot, or + + `rustc --version` to get the toolchain version. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_show_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_show_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..5a567318ca --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_show_cmd_help_flag.stdout.term.svg @@ -0,0 +1,67 @@ + + + + + + + Show the active and installed toolchains or profiles + + + + Usage: rustup[EXE] show [OPTIONS] [COMMAND] + + + + Commands: + + active-toolchain Show the active toolchain + + home Display the computed value of RUSTUP_HOME + + profile Show the default profile used for the `rustup install` command + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -v, --verbose Enable verbose output with rustc information for all installed toolchains + + -h, --help Print help + + + + Discussion: + + Shows the name of the active toolchain and the version of `rustc`. + + + + If the active toolchain has installed support for additional + + compilation targets, then they are listed as well. + + + + If there are multiple toolchains installed then all installed + + toolchains are listed as well. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_show_cmd_home_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_show_cmd_home_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..91dbcbf2d7 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_show_cmd_home_cmd_help_flag.stdout.term.svg @@ -0,0 +1,35 @@ + + + + + + + Display the computed value of RUSTUP_HOME + + + + Usage: rustup[EXE] show home + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_show_cmd_profile_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_show_cmd_profile_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..6dbb72a2fb --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_show_cmd_profile_cmd_help_flag.stdout.term.svg @@ -0,0 +1,35 @@ + + + + + + + Show the default profile used for the `rustup install` command + + + + Usage: rustup[EXE] show profile + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_target_cmd_add_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_target_cmd_add_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..5cdcc42e28 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_target_cmd_add_cmd_help_flag.stdout.term.svg @@ -0,0 +1,45 @@ + + + + + + + Add a target to a Rust toolchain + + + + Usage: rustup[EXE] target add [OPTIONS] <TARGET>... + + + + Arguments: + + <TARGET>... List of targets to install; "all" installs all available targets + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_target_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_target_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..069fca346a --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_target_cmd_help_flag.stdout.term.svg @@ -0,0 +1,47 @@ + + + + + + + Modify a toolchain's supported targets + + + + Usage: rustup[EXE] target <COMMAND> + + + + Commands: + + list List installed and available targets + + add Add a target to a Rust toolchain + + remove Remove a target from a Rust toolchain + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_target_cmd_list_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_target_cmd_list_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..3baed71eca --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_target_cmd_list_cmd_help_flag.stdout.term.svg @@ -0,0 +1,43 @@ + + + + + + + List installed and available targets + + + + Usage: rustup[EXE] target list [OPTIONS] + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + --installed List only installed targets + + -q, --quiet Force the output to be a single column + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_target_cmd_remove_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_target_cmd_remove_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..ac5dd123f0 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_target_cmd_remove_cmd_help_flag.stdout.term.svg @@ -0,0 +1,45 @@ + + + + + + + Remove a target from a Rust toolchain + + + + Usage: rustup[EXE] target remove [OPTIONS] <TARGET>... + + + + Arguments: + + <TARGET>... List of targets to uninstall + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more + + information see `rustup help toolchain` + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..9696a68eac --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_help_flag.stdout.term.svg @@ -0,0 +1,137 @@ + + + + + + + Install, uninstall, or list toolchains + + + + Usage: rustup[EXE] toolchain <COMMAND> + + + + Commands: + + list List installed toolchains + + install Install or update the given toolchains, or by default the active toolchain + + uninstall Uninstall the given toolchains + + link Create a custom toolchain by symlinking to a directory + + help Print this message or the help of the given subcommand(s) + + + + Options: + + -h, --help Print help + + + + Discussion: + + Many `rustup` commands deal with *toolchains*, a single + + installation of the Rust compiler. `rustup` supports multiple + + types of toolchains. The most basic track the official release + + channels: 'stable', 'beta' and 'nightly'; but `rustup` can also + + install specific toolchains from the official archives, toolchains for + + alternate host platforms, and from local builds ('custom toolchains'). + + + + Standard release channel toolchain names have the following form: + + + + <channel>[-<date>][-<host>] + + + + <channel> = stable|beta|nightly|<versioned>[-<prerelease>] + + <versioned> = <major.minor>|<major.minor.patch> + + <prerelease> = beta[.<number>] + + <date> = YYYY-MM-DD + + <host> = <target-triple> + + + + 'channel' is a named release channel, a major and minor version + + number such as `1.42`, or a fully specified version number, such + + as `1.42.0`. Channel names can be optionally appended with an + + archive date, as in `nightly-2014-12-18`, in which case the + + toolchain is downloaded from the archive for that date. + + + + The host may be specified as a target triple. This is most useful + + for installing a 32-bit compiler on a 64-bit platform, or for + + installing the [MSVC-based toolchain] on Windows. For example: + + + + $ rustup toolchain install stable-x86_64-pc-windows-msvc + + + + For convenience, omitted elements of the target triple will be + + inferred, so the above could be written: + + + + $ rustup toolchain install stable-msvc + + + + The `rustup default` command may be used to both install and set + + the desired toolchain as default in a single command: + + + + $ rustup default stable-msvc + + + + rustup can also manage symlinked local toolchain builds, which are + + often used for developing Rust itself. For more information see + + `rustup toolchain help link`. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_install_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_install_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..5eb387bb9a --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_install_cmd_help_flag.stdout.term.svg @@ -0,0 +1,63 @@ + + + + + + + Install or update the given toolchains, or by default the active toolchain + + + + Usage: rustup[EXE] toolchain install [OPTIONS] [TOOLCHAIN]... + + + + Arguments: + + [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see + + `rustup help toolchain` + + + + Options: + + --profile <PROFILE> [possible values: minimal, default, complete] + + -c, --component <COMPONENT> Comma-separated list of components to be added on installation + + -t, --target <TARGET> Comma-separated list of targets to be added on installation + + --no-self-update Don't perform self update when running the `rustup toolchain install` + + command + + --force Force an update, even if some components are missing + + --allow-downgrade Allow rustup to downgrade the toolchain to satisfy your component + + choice + + --force-non-host Install toolchains that require an emulator. See + + https://github.com/rust-lang/rustup/wiki/Non-host-toolchains + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_link_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_link_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..db37757b57 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_link_cmd_help_flag.stdout.term.svg @@ -0,0 +1,85 @@ + + + + + + + Create a custom toolchain by symlinking to a directory + + + + Usage: rustup[EXE] toolchain link <TOOLCHAIN> <PATH> + + + + Arguments: + + <TOOLCHAIN> Custom toolchain name + + <PATH> Path to the directory + + + + Options: + + -h, --help Print help + + + + Discussion: + + 'toolchain' is the custom name to be assigned to the new toolchain. + + Any name is permitted as long as: + + - it does not include '/' or '/' except as the last character + + - it is not equal to 'none' + + - it does not fully match an initialsubstring of a standard release channel. + + For example, you can use the names 'latest' or '2017-04-01' but you cannot + + use 'stable' or 'beta-i686' or 'nightly-x86_64-unknown-linux-gnu'. + + + + 'path' specifies the directory where the binaries and libraries for + + the custom toolchain can be found. For example, when used for + + development of Rust itself, toolchains can be linked directly out of + + the build directory. After building, you can test out different + + compiler versions as follows: + + + + $ rustup toolchain link latest-stage1 build/x86_64-unknown-linux-gnu/stage1 + + $ rustup override set latest-stage1 + + + + If you now compile a crate in the current directory, the custom + + toolchain 'latest-stage1' will be used. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_list_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_list_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..71c219916f --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_list_cmd_help_flag.stdout.term.svg @@ -0,0 +1,39 @@ + + + + + + + List installed toolchains + + + + Usage: rustup[EXE] toolchain list [OPTIONS] + + + + Options: + + -v, --verbose Enable verbose output with toolchain information + + -q, --quiet Force the output to be a single column + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_uninstall_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_uninstall_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..b8942be96f --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_toolchain_cmd_uninstall_cmd_help_flag.stdout.term.svg @@ -0,0 +1,43 @@ + + + + + + + Uninstall the given toolchains + + + + Usage: rustup[EXE] toolchain uninstall <TOOLCHAIN>... + + + + Arguments: + + <TOOLCHAIN>... Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom toolchain name. + + For more information see `rustup help toolchain` + + + + Options: + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_unknown_arg.stderr.term.svg b/tests/suite/cli_rustup_ui/rustup_unknown_arg.stderr.term.svg new file mode 100644 index 0000000000..7ffe1fab85 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_unknown_arg.stderr.term.svg @@ -0,0 +1,29 @@ + + + + + + + error: invalid value 'random' for '[+toolchain]': error: "random" is not a valid subcommand, so it was interpreted as a toolchain name, but it is also invalid. To override the toolchain using the 'rustup +toolchain' syntax, make sure to prefix the toolchain override with a '+' + + + + For more information, try '--help'. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_up_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_up_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..f8fa2af1d3 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_up_cmd_help_flag.stdout.term.svg @@ -0,0 +1,67 @@ + + + + + + + Update Rust toolchains and rustup + + + + Usage: rustup[EXE] update [OPTIONS] [TOOLCHAIN]... + + + + Arguments: + + [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see + + `rustup help toolchain` + + + + Options: + + --no-self-update Don't perform self update when running the `rustup update` command + + --force Force an update, even if some components are missing + + --force-non-host Install toolchains that require an emulator. See + + https://github.com/rust-lang/rustup/wiki/Non-host-toolchains + + -h, --help Print help + + + + Discussion: + + With no toolchain specified, the `update` command updates each of + + the installed toolchains from the official release channels, then + + updates rustup itself. + + + + If given a toolchain argument then `update` updates that + + toolchain, the same as `rustup toolchain install`. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_update_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_update_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..f8fa2af1d3 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_update_cmd_help_flag.stdout.term.svg @@ -0,0 +1,67 @@ + + + + + + + Update Rust toolchains and rustup + + + + Usage: rustup[EXE] update [OPTIONS] [TOOLCHAIN]... + + + + Arguments: + + [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see + + `rustup help toolchain` + + + + Options: + + --no-self-update Don't perform self update when running the `rustup update` command + + --force Force an update, even if some components are missing + + --force-non-host Install toolchains that require an emulator. See + + https://github.com/rust-lang/rustup/wiki/Non-host-toolchains + + -h, --help Print help + + + + Discussion: + + With no toolchain specified, the `update` command updates each of + + the installed toolchains from the official release channels, then + + updates rustup itself. + + + + If given a toolchain argument then `update` updates that + + toolchain, the same as `rustup toolchain install`. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_upgrade_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_upgrade_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..f8fa2af1d3 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_upgrade_cmd_help_flag.stdout.term.svg @@ -0,0 +1,67 @@ + + + + + + + Update Rust toolchains and rustup + + + + Usage: rustup[EXE] update [OPTIONS] [TOOLCHAIN]... + + + + Arguments: + + [TOOLCHAIN]... Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see + + `rustup help toolchain` + + + + Options: + + --no-self-update Don't perform self update when running the `rustup update` command + + --force Force an update, even if some components are missing + + --force-non-host Install toolchains that require an emulator. See + + https://github.com/rust-lang/rustup/wiki/Non-host-toolchains + + -h, --help Print help + + + + Discussion: + + With no toolchain specified, the `update` command updates each of + + the installed toolchains from the official release channels, then + + updates rustup itself. + + + + If given a toolchain argument then `update` updates that + + toolchain, the same as `rustup toolchain install`. + + + + + + diff --git a/tests/suite/cli_rustup_ui/rustup_which_cmd_help_flag.stdout.term.svg b/tests/suite/cli_rustup_ui/rustup_which_cmd_help_flag.stdout.term.svg new file mode 100644 index 0000000000..a34c424326 --- /dev/null +++ b/tests/suite/cli_rustup_ui/rustup_which_cmd_help_flag.stdout.term.svg @@ -0,0 +1,45 @@ + + + + + + + Display which binary will be run for a given command + + + + Usage: rustup[EXE] which [OPTIONS] <COMMAND> + + + + Arguments: + + <COMMAND> + + + + Options: + + --toolchain <TOOLCHAIN> Toolchain name, such as 'stable', 'nightly', '1.8.0', or a custom + + toolchain name. For more information see `rustup help toolchain` + + -h, --help Print help + + + + + + diff --git a/tests/suite/cli_ui.rs b/tests/suite/cli_ui.rs deleted file mode 100644 index 17d8a420fc..0000000000 --- a/tests/suite/cli_ui.rs +++ /dev/null @@ -1,65 +0,0 @@ -use std::{fs, path::PathBuf}; - -#[test] -fn rustup_ui_doc_text_tests() { - let t = trycmd::TestCases::new(); - let home = tempfile::TempDir::new().unwrap(); - let rustup_init = trycmd::cargo::cargo_bin("rustup-init"); - let rustup = trycmd::cargo::cargo_bin("rustup"); - // Copy rustup-init to rustup so that the tests can run it. - fs::copy(rustup_init, &rustup).unwrap(); - t.register_bin("rustup", &rustup); - t.case("tests/suite/cli-ui/rustup/*.toml"); - // once installed rustup asserts the presence of ~/.rustup/settings.toml if - // Config is instantiated. - t.env("HOME", home.path().to_string_lossy()); - #[cfg(target_os = "windows")] - { - // On windows, we don't have man command, so skip the test. - t.skip("tests/suite/cli-ui/rustup/rustup_man_cmd_help_flag_stdout.toml"); - } -} - -#[test] -fn rustup_init_ui_doc_text_tests() { - let t = trycmd::TestCases::new(); - let rustup_init = trycmd::cargo::cargo_bin("rustup-init"); - let project_root = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - t.register_bin("rustup-init", &rustup_init); - t.register_bin("rustup-init.sh", project_root.join("rustup-init.sh")); - t.case("tests/suite/cli-ui/rustup-init/*.toml"); - #[cfg(target_os = "windows")] - { - // On windows, we don't use rustup-init.sh, so skip the test. - t.skip("tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml"); - } - - // On non-windows, we don't use rustup-init.sh, so skip the test. - #[cfg(not(target_os = "windows"))] - { - let rustup_init_help_toml = - project_root.join("tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml"); - let rustup_init_sh_help_toml = project_root - .join("tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml"); - - #[derive(Debug, PartialEq, Eq, serde::Deserialize, serde::Serialize)] - struct Stdout { - #[serde(default)] - pub(crate) stdout: Option, - } - let rustup_init_help_std_out: Stdout = - toml::from_str(fs::read_to_string(rustup_init_help_toml).unwrap().as_str()).unwrap(); - let rustup_init_sh_help_std_out: Stdout = toml::from_str( - fs::read_to_string(rustup_init_sh_help_toml) - .unwrap() - .as_str(), - ) - .unwrap(); - - // Make sure that the help output of rustup-init and rustup-init.sh are the same. - assert_eq!( - rustup_init_help_std_out.stdout.unwrap(), - rustup_init_sh_help_std_out.stdout.unwrap() - ) - } -} diff --git a/tests/suite/mod.rs b/tests/suite/mod.rs index de895965ac..ce3956ca3d 100644 --- a/tests/suite/mod.rs +++ b/tests/suite/mod.rs @@ -3,8 +3,9 @@ mod cli_inst_interactive; mod cli_misc; mod cli_paths; mod cli_rustup; +mod cli_rustup_init_ui; +mod cli_rustup_ui; mod cli_self_upd; -mod cli_ui; mod cli_v1; mod cli_v2; mod dist_install;