Show help info when no or wrong arguments are given
Fixes #5383, fixes #5384
This commit is contained in:
parent
f3a4b22457
commit
18d71a8471
8 changed files with 124 additions and 4 deletions
|
@ -23,6 +23,21 @@ Options:
|
|||
-h, --help Show help information
|
||||
";
|
||||
|
||||
private const string RemoveCommandHelpText = @".NET Remove Command
|
||||
|
||||
Usage: dotnet remove [options] <PROJECT> [command]
|
||||
|
||||
Arguments:
|
||||
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
|
||||
|
||||
Options:
|
||||
-h, --help Show help information
|
||||
|
||||
Commands:
|
||||
package <PACKAGE_NAME> .NET Remove Package reference Command.
|
||||
reference <args> .NET Remove Project to Project reference Command
|
||||
";
|
||||
|
||||
[Theory]
|
||||
[InlineData("--help")]
|
||||
[InlineData("-h")]
|
||||
|
@ -42,6 +57,7 @@ Options:
|
|||
.ExecuteWithCapturedOutput($"remove {commandName}");
|
||||
cmd.Should().Fail();
|
||||
cmd.StdErr.Should().Be("Required command was not provided.");
|
||||
cmd.StdOut.Should().BeVisuallyEquivalentTo(RemoveCommandHelpText);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue