Change format for the command section in help text (#83)

This commit is contained in:
Rene Escalante
2020-10-29 12:31:03 -06:00
committed by GitHub
parent 6a378ad946
commit fec6850c39
2 changed files with 22 additions and 33 deletions

View File

@@ -65,7 +65,7 @@ namespace CliFx.Tests
}
[Fact]
public async Task Help_text_shows_usage_format_which_lists_available_sub_commands()
public async Task Help_text_shows_commands_list_with_description_and_usage_info()
{
// Arrange
var (console, stdOut, _) = VirtualConsole.CreateBuffered();
@@ -78,14 +78,16 @@ namespace CliFx.Tests
.Build();
// Act
var exitCode = await application.RunAsync(new[] {"--help"});
var exitCode = await application.RunAsync(new[] { "--help" });
// Assert
exitCode.Should().Be(0);
stdOut.GetString().Should().ContainAll(
"Usage",
"... named",
"... named sub"
"Commands",
"Named command description",
"named [options]",
"Named sub command description",
"named sub [options]"
);
_output.WriteLine(stdOut.GetString());