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
|
@ -24,6 +24,20 @@ Options:
|
|||
-h, --help Show help information
|
||||
";
|
||||
|
||||
private const string ListCommandHelpText = @".NET List Command
|
||||
|
||||
Usage: dotnet list [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:
|
||||
reference .NET Core Project-to-Project dependency viewer
|
||||
";
|
||||
|
||||
const string FrameworkNet451Arg = "-f net451";
|
||||
const string ConditionFrameworkNet451 = "== 'net451'";
|
||||
const string FrameworkNetCoreApp10Arg = "-f netcoreapp1.0";
|
||||
|
@ -48,6 +62,7 @@ Options:
|
|||
.ExecuteWithCapturedOutput($"list {commandName}");
|
||||
cmd.Should().Fail();
|
||||
cmd.StdErr.Should().Be("Required command was not provided.");
|
||||
cmd.StdOut.Should().BeVisuallyEquivalentTo(ListCommandHelpText);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue