Remove argument separator from commands (#5080)

* Remove argument separator from commands

Currently, the argument separator (`--`) is only supported on
`dotnet run`. This PR removes it from other commands to make the help and
usage of these command clearer.

* Adding dotnet run message test

* Responding to PR feedback
This commit is contained in:
Zlatko Knezevic 2016-12-19 22:11:39 -08:00 committed by Piotr Puszkiewicz
parent 2d5e40f3ba
commit b467d66182
8 changed files with 23 additions and 10 deletions

View file

@ -56,7 +56,6 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
[InlineData("pack", true)]
[InlineData("publish", true)]
[InlineData("restore", true)]
[InlineData("run", true)]
public void When_help_is_invoked_Then_MSBuild_extra_options_text_is_included_in_output(string commandName, bool isMSBuildCommand)
{
const string MSBuildHelpText = " Any extra options that should be passed to MSBuild. See 'dotnet msbuild -h' for available options.";
@ -77,6 +76,20 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
}
}
[Fact]
public void WhenDotnetRunHelpIsInvokedAppArgumentsTextIsIncludedInOutput()
{
const string AppArgumentsText = "Arguments passed to the application that is being run.";
var projectDirectory = TestAssetsManager.CreateTestDirectory("RunContainsAppArgumentsText");
var result = new TestCommand("dotnet")
.WithWorkingDirectory(projectDirectory.Path)
.ExecuteWithCapturedOutput("run --help");
result.ExitCode.Should().Be(0);
result.StdOut.Should().Contain(AppArgumentsText);
}
[Fact]
public void WhenTelemetryIsEnabledTheLoggerIsAddedToTheCommandLine()
{