Skip to content

Commit 8014377

Browse files
committed
Fix windows tests
Signed-off-by: hi-rustin <[email protected]>
1 parent 57826e0 commit 8014377

File tree

43 files changed

+88
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+88
-83
lines changed

tests/cli-ui.rs

+5
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ fn ui_tests() {
1010
utils::copy_file(&rustup_init, &rustup).unwrap();
1111
t.register_bin("rustup", &rustup);
1212
t.case("tests/cli-ui/*.toml");
13+
#[cfg(target_os = "windows")]
14+
{
15+
// On windows, we don't have man command, so skip the tests.
16+
t.skip("tests/cli-ui/rustup_man_cmd_help_flag_stdout.toml");
17+
}
1318
}

tests/cli-ui/rustup-init_help_flag_stdout.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rustup-init [..]
66
The installer for rustup
77
88
USAGE:
9-
rustup-init [FLAGS] [OPTIONS]
9+
rustup-init[EXE] [FLAGS] [OPTIONS]
1010
1111
FLAGS:
1212
-v, --verbose Enable verbose output

tests/cli-ui/rustup_check_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["check","--help"]
33
stdout = """
4-
rustup-check
4+
...
55
Check for updates to Rust toolchains and rustup
66
77
USAGE:
8-
rustup check
8+
rustup[EXE] check
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_completions_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["completions","--help"]
33
stdout = """
4-
rustup-completions
4+
...
55
Generate tab-completion scripts for your shell
66
77
USAGE:
8-
rustup completions [ARGS]
8+
rustup[EXE] completions [ARGS]
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_component_cmd_add_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["component","add","--help"]
33
stdout = """
4-
rustup-component-add
4+
...
55
Add a component to a Rust toolchain
66
77
USAGE:
8-
rustup component add [OPTIONS] <component>...
8+
rustup[EXE] component add [OPTIONS] <component>...
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_component_cmd_list_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["component","list","--help"]
33
stdout = """
4-
rustup-component-list
4+
...
55
List installed and available components
66
77
USAGE:
8-
rustup component list [FLAGS] [OPTIONS]
8+
rustup[EXE] component list [FLAGS] [OPTIONS]
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_component_cmd_remove_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["component","remove","--help"]
33
stdout = """
4-
rustup-component-remove
4+
...
55
Remove a component from a Rust toolchain
66
77
USAGE:
8-
rustup component remove [OPTIONS] <component>...
8+
rustup[EXE] component remove [OPTIONS] <component>...
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_default_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["default","--help"]
33
stdout = """
4-
rustup-default
4+
...
55
Set the default toolchain
66
77
USAGE:
8-
rustup default [toolchain]
8+
rustup[EXE] default [toolchain]
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_doc_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["doc","--help"]
33
stdout = """
4-
rustup-doc
4+
...
55
Open the documentation for the current toolchain
66
77
USAGE:
8-
rustup doc [FLAGS] [OPTIONS] [topic]
8+
rustup[EXE] doc [FLAGS] [OPTIONS] [topic]
99
1010
FLAGS:
1111
--alloc The Rust core allocation and collections library

tests/cli-ui/rustup_help_cmd_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rustup [..]
66
The Rust toolchain installer
77
88
USAGE:
9-
rustup [FLAGS] [+toolchain] <SUBCOMMAND>
9+
rustup[EXE] [FLAGS] [+toolchain] <SUBCOMMAND>
1010
1111
FLAGS:
1212
-v, --verbose Enable verbose output
@@ -29,7 +29,7 @@ SUBCOMMANDS:
2929
run Run a command with an environment configured for a given toolchain
3030
which Display which binary will be run for a given command
3131
doc Open the documentation for the current toolchain
32-
man View the man page for a given command
32+
...
3333
self Modify the rustup installation
3434
set Alter rustup settings
3535
completions Generate tab-completion scripts for your shell

tests/cli-ui/rustup_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rustup [..]
66
The Rust toolchain installer
77
88
USAGE:
9-
rustup [FLAGS] [+toolchain] <SUBCOMMAND>
9+
rustup[EXE] [FLAGS] [+toolchain] <SUBCOMMAND>
1010
1111
FLAGS:
1212
-v, --verbose Enable verbose output
@@ -29,7 +29,7 @@ SUBCOMMANDS:
2929
run Run a command with an environment configured for a given toolchain
3030
which Display which binary will be run for a given command
3131
doc Open the documentation for the current toolchain
32-
man View the man page for a given command
32+
...
3333
self Modify the rustup installation
3434
set Alter rustup settings
3535
completions Generate tab-completion scripts for your shell

tests/cli-ui/rustup_man_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["man","--help"]
33
stdout = """
4-
rustup-man
4+
...
55
View the man page for a given command
66
77
USAGE:
8-
rustup man [OPTIONS] <command>
8+
rustup[EXE] man [OPTIONS] <command>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_override_cmd_add_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["override","add","--help"]
33
stdout = """
4-
rustup-override-set
4+
...
55
Set the override toolchain for a directory
66
77
USAGE:
8-
rustup override set [OPTIONS] <toolchain>
8+
rustup[EXE] override set [OPTIONS] <toolchain>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_override_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["override","--help"]
33
stdout = """
4-
rustup-override
4+
...
55
Modify directory toolchain overrides
66
77
USAGE:
8-
rustup override <SUBCOMMAND>
8+
rustup[EXE] override <SUBCOMMAND>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_override_cmd_list_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["override","list","--help"]
33
stdout = """
4-
rustup-override-list
4+
...
55
List directory toolchain overrides
66
77
USAGE:
8-
rustup override list
8+
rustup[EXE] override list
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_override_cmd_remove_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["override","unset","--help"]
33
stdout = """
4-
rustup-override-unset
4+
...
55
Remove the override toolchain for a directory
66
77
USAGE:
8-
rustup override unset [FLAGS] [OPTIONS]
8+
rustup[EXE] override unset [FLAGS] [OPTIONS]
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_override_cmd_set_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["override","set","--help"]
33
stdout = """
4-
rustup-override-set
4+
...
55
Set the override toolchain for a directory
66
77
USAGE:
8-
rustup override set [OPTIONS] <toolchain>
8+
rustup[EXE] override set [OPTIONS] <toolchain>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_override_cmd_unset_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["override","unset","--help"]
33
stdout = """
4-
rustup-override-unset
4+
...
55
Remove the override toolchain for a directory
66
77
USAGE:
8-
rustup override unset [FLAGS] [OPTIONS]
8+
rustup[EXE] override unset [FLAGS] [OPTIONS]
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_run_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["run","--help"]
33
stdout = """
4-
rustup-run
4+
...
55
Run a command with an environment configured for a given toolchain
66
77
USAGE:
8-
rustup run [FLAGS] <toolchain> <command>...
8+
rustup[EXE] run [FLAGS] <toolchain> <command>...
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_self_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["self","--help"]
33
stdout = """
4-
rustup-self
4+
...
55
Modify the rustup installation
66
77
USAGE:
8-
rustup self <SUBCOMMAND>
8+
rustup[EXE] self <SUBCOMMAND>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_self_cmd_uninstall_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["self","uninstall","--help"]
33
stdout = """
4-
rustup-self-uninstall
4+
...
55
Uninstall rustup.
66
77
USAGE:
8-
rustup self uninstall [FLAGS]
8+
rustup[EXE] self uninstall [FLAGS]
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_self_cmd_update_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["self","update","--help"]
33
stdout = """
4-
rustup-self-update
4+
...
55
Download and install updates to rustup
66
77
USAGE:
8-
rustup self update
8+
rustup[EXE] self update
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_self_cmd_upgrade-data _cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["self","upgrade-data","--help"]
33
stdout = """
4-
rustup-self-upgrade-data
4+
...
55
Upgrade the internal data format.
66
77
USAGE:
8-
rustup self upgrade-data
8+
rustup[EXE] self upgrade-data
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_set_cmd_auto-self-update_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["set","auto-self-update","--help"]
33
stdout = """
4-
rustup-set-auto-self-update
4+
...
55
The rustup auto self update mode
66
77
USAGE:
8-
rustup set auto-self-update <auto-self-update-mode>
8+
rustup[EXE] set auto-self-update <auto-self-update-mode>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_set_cmd_default-host_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["set","default-host","--help"]
33
stdout = """
4-
rustup-set-default-host
4+
...
55
The triple used to identify toolchains when not specified
66
77
USAGE:
8-
rustup set default-host <host_triple>
8+
rustup[EXE] set default-host <host_triple>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_set_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["set","--help"]
33
stdout = """
4-
rustup-set
4+
...
55
Alter rustup settings
66
77
USAGE:
8-
rustup set <SUBCOMMAND>
8+
rustup[EXE] set <SUBCOMMAND>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_set_cmd_profile_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["set","profile","--help"]
33
stdout = """
4-
rustup-set-profile
4+
...
55
The default components installed
66
77
USAGE:
8-
rustup set profile <profile-name>
8+
rustup[EXE] set profile <profile-name>
99
1010
FLAGS:
1111
-h, --help Prints help information

tests/cli-ui/rustup_show_cmd_active-toolchain_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
bin.name = "rustup"
22
args = ["show","active-toolchain","--help"]
33
stdout = """
4-
rustup-show-active-toolchain
4+
...
55
Show the active toolchain
66
77
USAGE:
8-
rustup show active-toolchain [FLAGS]
8+
rustup[EXE] show active-toolchain [FLAGS]
99
1010
FLAGS:
1111
-h, --help Prints help information

0 commit comments

Comments
 (0)