Changing dotnet-test options (#4987)
In Preview 3, the `dotnet test` options were not aligned with the CLI's adopted format. This PR changes the options to be aligned. Where possible/applicable, I have shortened the long options to a meaningful mnemonic short version. Fixes #4960
This commit is contained in:
parent
1a49787a1f
commit
d335b5de40
3 changed files with 8 additions and 8 deletions
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
public const string CmdTestCaseFilterDescription = @"Run tests that match the given expression.
|
public const string CmdTestCaseFilterDescription = @"Run tests that match the given expression.
|
||||||
Examples:
|
Examples:
|
||||||
--testCaseFilter:""Priority = 1""
|
--test-case-filter:""Priority = 1""
|
||||||
--testCaseFilter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)""";
|
--test-case-filter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)""";
|
||||||
|
|
||||||
public const string CmdTestAdapterPathDescription = @"Use custom adapters from the given path in the test run.
|
public const string CmdTestAdapterPathDescription = @"Use custom adapters from the given path in the test run.
|
||||||
Example: --testAdapterPath:<pathToCustomAdapters>";
|
Example: --test-adapter-path:<pathToCustomAdapters>";
|
||||||
|
|
||||||
public const string CmdLoggerOption = "LoggerUri/FriendlyName";
|
public const string CmdLoggerOption = "LoggerUri/FriendlyName";
|
||||||
|
|
||||||
|
|
|
@ -39,17 +39,17 @@ namespace Microsoft.DotNet.Tools.Test
|
||||||
CommandOptionType.SingleValue);
|
CommandOptionType.SingleValue);
|
||||||
|
|
||||||
var listTestsOption = cmd.Option(
|
var listTestsOption = cmd.Option(
|
||||||
"-lt|--listTests",
|
"-t|--list-tests",
|
||||||
LocalizableStrings.CmdListTestsDescription,
|
LocalizableStrings.CmdListTestsDescription,
|
||||||
CommandOptionType.NoValue);
|
CommandOptionType.NoValue);
|
||||||
|
|
||||||
var testCaseFilterOption = cmd.Option(
|
var testCaseFilterOption = cmd.Option(
|
||||||
$"-tcf|--testCaseFilter <{LocalizableStrings.CmdTestCaseFilterExpression}>",
|
$"--test-case-filter <{LocalizableStrings.CmdTestCaseFilterExpression}>",
|
||||||
LocalizableStrings.CmdTestCaseFilterDescription,
|
LocalizableStrings.CmdTestCaseFilterDescription,
|
||||||
CommandOptionType.SingleValue);
|
CommandOptionType.SingleValue);
|
||||||
|
|
||||||
var testAdapterPathOption = cmd.Option(
|
var testAdapterPathOption = cmd.Option(
|
||||||
"-tap|--testAdapterPath",
|
"-a|--test-adapter-path",
|
||||||
LocalizableStrings.CmdTestAdapterPathDescription,
|
LocalizableStrings.CmdTestAdapterPathDescription,
|
||||||
CommandOptionType.SingleValue);
|
CommandOptionType.SingleValue);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ namespace Microsoft.DotNet.Tools.Test
|
||||||
CommandOptionType.SingleValue);
|
CommandOptionType.SingleValue);
|
||||||
|
|
||||||
var noBuildtOption = cmd.Option(
|
var noBuildtOption = cmd.Option(
|
||||||
"--noBuild",
|
"--no-build",
|
||||||
LocalizableStrings.CmdNoBuildDescription,
|
LocalizableStrings.CmdNoBuildDescription,
|
||||||
CommandOptionType.NoValue);
|
CommandOptionType.NoValue);
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
||||||
// Call test
|
// Call test
|
||||||
CommandResult result = new DotnetTestCommand()
|
CommandResult result = new DotnetTestCommand()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput("--noBuild");
|
.ExecuteWithCapturedOutput("--no-build");
|
||||||
|
|
||||||
// Verify
|
// Verify
|
||||||
result.StdOut.Should().Contain(expectedError);
|
result.StdOut.Should().Contain(expectedError);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue