Skip to content

Commit

Permalink
Update setup mode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-rustin committed Mar 3, 2023
1 parent aa27cd7 commit 71a0e70
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 55 deletions.
48 changes: 34 additions & 14 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,45 @@ rustup-init 1.25.2 (8c4dad73d 2023-02-01)
The installer for rustup
USAGE:
rustup-init [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
-y Disable confirmation prompt.
--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 Prints help information
-V, --version Prints version information
rustup-init [OPTIONS]
OPTIONS:
--default-host <default-host> Choose a default host triple
-v, --verbose
Enable verbose output
-q, --quiet
Disable progress output
-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 <components>... Component name to also install
-t, --target <targets>... Target name to also install
--profile <profile>
[default: default] [possible values: minimal, default, complete]
-c, --component <components>...
Component name to also install
-t, --target <targets>...
Target name 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 information
-V, --version
Print version information
EOF
}

Expand Down
15 changes: 2 additions & 13 deletions src/cli/setup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ pub fn main() -> Result<utils::ExitCode> {
.version(common::version())
.about("The installer for rustup")
.setting(AppSettings::DeriveDisplayOrder)
.help_template(
"\
{name} {version}
{about}
USAGE:
{usage}
{all-args}",
)
.arg(
Arg::new("verbose")
.short('v')
Expand Down Expand Up @@ -68,7 +58,7 @@ USAGE:
Arg::new("default-toolchain")
.long("default-toolchain")
.takes_value(true)
.help("Choose a default toolchain to install"),
.help("Choose a default toolchain to install. Use 'none' to not install any toolchains at all"),
)
.arg(
Arg::new("profile")
Expand All @@ -83,8 +73,7 @@ USAGE:
.short('c')
.takes_value(true)
.multiple_values(true)
.use_value_delimiter(true)
.action(ArgAction::Append),
.use_value_delimiter(true),
)
.arg(
Arg::new("targets")
Expand Down
48 changes: 34 additions & 14 deletions tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,44 @@ rustup-init [..]
The installer for rustup
USAGE:
rustup-init[EXE] [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
-y Disable confirmation prompt.
--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 Prints help information
-V, --version Prints version information
rustup-init[EXE] [OPTIONS]
OPTIONS:
--default-host <default-host> Choose a default host triple
-v, --verbose
Enable verbose output
-q, --quiet
Disable progress output
-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 <components>... Component name to also install
-t, --target <targets>... Target name to also install
--profile <profile>
[default: default] [possible values: minimal, default, complete]
-c, --component <components>...
Component name to also install
-t, --target <targets>...
Target name 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 information
-V, --version
Print version information
"""
stderr = ""
48 changes: 34 additions & 14 deletions tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,44 @@ rustup-init [..]
The installer for rustup
USAGE:
rustup-init[EXE] [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
-y Disable confirmation prompt.
--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 Prints help information
-V, --version Prints version information
rustup-init[EXE] [OPTIONS]
OPTIONS:
--default-host <default-host> Choose a default host triple
-v, --verbose
Enable verbose output
-q, --quiet
Disable progress output
-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 <components>... Component name to also install
-t, --target <targets>... Target name to also install
--profile <profile>
[default: default] [possible values: minimal, default, complete]
-c, --component <components>...
Component name to also install
-t, --target <targets>...
Target name 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 information
-V, --version
Print version information
"""
stderr = ""

0 comments on commit 71a0e70

Please sign in to comment.