Skip to content

Commit 55c6fdb

Browse files
committed
Update setup mode tests
1 parent aa27cd7 commit 55c6fdb

File tree

4 files changed

+105
-54
lines changed

4 files changed

+105
-54
lines changed

rustup-init.sh

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,45 @@ rustup-init 1.25.2 (8c4dad73d 2023-02-01)
2929
The installer for rustup
3030
3131
USAGE:
32-
rustup-init [FLAGS] [OPTIONS]
33-
34-
FLAGS:
35-
-v, --verbose Enable verbose output
36-
-q, --quiet Disable progress output
37-
-y Disable confirmation prompt.
38-
--no-update-default-toolchain Don't update any existing default toolchain after install
39-
--no-modify-path Don't configure the PATH environment variable
40-
-h, --help Prints help information
41-
-V, --version Prints version information
32+
rustup-init [OPTIONS]
4233
4334
OPTIONS:
44-
--default-host <default-host> Choose a default host triple
35+
-v, --verbose
36+
Enable verbose output
37+
38+
-q, --quiet
39+
Disable progress output
40+
41+
-y
42+
Disable confirmation prompt.
43+
44+
--default-host <default-host>
45+
Choose a default host triple
46+
4547
--default-toolchain <default-toolchain>
4648
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
4749
48-
--profile <profile> [default: default] [possible values: minimal, default, complete]
49-
-c, --component <components>... Component name to also install
50-
-t, --target <targets>... Target name to also install
50+
--profile <profile>
51+
[default: default] [possible values: minimal, default, complete]
52+
53+
-c, --component <components>...
54+
Component name to also install
55+
56+
-t, --target <targets>...
57+
Target name to also install
58+
59+
--no-update-default-toolchain
60+
Don't update any existing default toolchain after install
61+
62+
--no-modify-path
63+
Don't configure the PATH environment variable
64+
65+
-h, --help
66+
Print help information
67+
68+
-V, --version
69+
Print version information
70+
5171
EOF
5272
}
5373

src/cli/setup_mode.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ pub fn main() -> Result<utils::ExitCode> {
2727
.version(common::version())
2828
.about("The installer for rustup")
2929
.setting(AppSettings::DeriveDisplayOrder)
30-
.help_template(
31-
"\
32-
{name} {version}
33-
{about}
34-
35-
USAGE:
36-
{usage}
37-
38-
{all-args}",
39-
)
4030
.arg(
4131
Arg::new("verbose")
4232
.short('v')
@@ -68,7 +58,7 @@ USAGE:
6858
Arg::new("default-toolchain")
6959
.long("default-toolchain")
7060
.takes_value(true)
71-
.help("Choose a default toolchain to install"),
61+
.help("Choose a default toolchain to install. Use 'none' to not install any toolchains at all"),
7262
)
7363
.arg(
7464
Arg::new("profile")
@@ -93,7 +83,8 @@ USAGE:
9383
.short('t')
9484
.takes_value(true)
9585
.multiple_values(true)
96-
.use_value_delimiter(true),
86+
.use_value_delimiter(true)
87+
.action(ArgAction::Append),
9788
)
9889
.arg(
9990
Arg::new("no-update-default-toolchain")

tests/suite/cli-ui/rustup-init/rustup-init_help_flag_stdout.toml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,44 @@ rustup-init [..]
66
The installer for rustup
77
88
USAGE:
9-
rustup-init[EXE] [FLAGS] [OPTIONS]
10-
11-
FLAGS:
12-
-v, --verbose Enable verbose output
13-
-q, --quiet Disable progress output
14-
-y Disable confirmation prompt.
15-
--no-update-default-toolchain Don't update any existing default toolchain after install
16-
--no-modify-path Don't configure the PATH environment variable
17-
-h, --help Prints help information
18-
-V, --version Prints version information
9+
rustup-init[EXE] [OPTIONS]
1910
2011
OPTIONS:
21-
--default-host <default-host> Choose a default host triple
12+
-v, --verbose
13+
Enable verbose output
14+
15+
-q, --quiet
16+
Disable progress output
17+
18+
-y
19+
Disable confirmation prompt.
20+
21+
--default-host <default-host>
22+
Choose a default host triple
23+
2224
--default-toolchain <default-toolchain>
2325
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
2426
25-
--profile <profile> [default: default] [possible values: minimal, default, complete]
26-
-c, --component <components>... Component name to also install
27-
-t, --target <targets>... Target name to also install
27+
--profile <profile>
28+
[default: default] [possible values: minimal, default, complete]
29+
30+
-c, --component <components>...
31+
Component name to also install
32+
33+
-t, --target <targets>...
34+
Target name to also install
35+
36+
--no-update-default-toolchain
37+
Don't update any existing default toolchain after install
38+
39+
--no-modify-path
40+
Don't configure the PATH environment variable
41+
42+
-h, --help
43+
Print help information
44+
45+
-V, --version
46+
Print version information
47+
2848
"""
2949
stderr = ""

tests/suite/cli-ui/rustup-init/rustup-init_sh_help_flag_stdout.toml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,44 @@ rustup-init [..]
66
The installer for rustup
77
88
USAGE:
9-
rustup-init[EXE] [FLAGS] [OPTIONS]
10-
11-
FLAGS:
12-
-v, --verbose Enable verbose output
13-
-q, --quiet Disable progress output
14-
-y Disable confirmation prompt.
15-
--no-update-default-toolchain Don't update any existing default toolchain after install
16-
--no-modify-path Don't configure the PATH environment variable
17-
-h, --help Prints help information
18-
-V, --version Prints version information
9+
rustup-init[EXE] [OPTIONS]
1910
2011
OPTIONS:
21-
--default-host <default-host> Choose a default host triple
12+
-v, --verbose
13+
Enable verbose output
14+
15+
-q, --quiet
16+
Disable progress output
17+
18+
-y
19+
Disable confirmation prompt.
20+
21+
--default-host <default-host>
22+
Choose a default host triple
23+
2224
--default-toolchain <default-toolchain>
2325
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
2426
25-
--profile <profile> [default: default] [possible values: minimal, default, complete]
26-
-c, --component <components>... Component name to also install
27-
-t, --target <targets>... Target name to also install
27+
--profile <profile>
28+
[default: default] [possible values: minimal, default, complete]
29+
30+
-c, --component <components>...
31+
Component name to also install
32+
33+
-t, --target <targets>...
34+
Target name to also install
35+
36+
--no-update-default-toolchain
37+
Don't update any existing default toolchain after install
38+
39+
--no-modify-path
40+
Don't configure the PATH environment variable
41+
42+
-h, --help
43+
Print help information
44+
45+
-V, --version
46+
Print version information
47+
2848
"""
2949
stderr = ""

0 commit comments

Comments
 (0)