Skip to content

Commit 0facdf6

Browse files
committed
Fix windows tests
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent 8332528 commit 0facdf6

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ fn ui_tests() {
1010
fs::copy(&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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

0 commit comments

Comments
 (0)