Add test for commands without doclink
This commit is contained in:
parent
5ae335b592
commit
44d25ae3af
1 changed files with 13 additions and 0 deletions
|
@ -89,6 +89,19 @@ runtime-options:
|
|||
cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(HelpText);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("complete")]
|
||||
[InlineData("parse")]
|
||||
public void WhenCommandWithoutDocLinkIsPassedToDotnetHelpItPrintsError(string command)
|
||||
{
|
||||
var cmd = new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput($"help {command}");
|
||||
|
||||
cmd.Should().Fail();
|
||||
cmd.StdErr.Should().Contain(string.Format(Tools.Help.LocalizableStrings.CommandDoesNotExist, command));
|
||||
cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(HelpText);
|
||||
}
|
||||
|
||||
[WindowsOnlyFact]
|
||||
public void WhenRunOnWindowsDotnetHelpCommandShouldContainProperProcessInformation()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue