Merge branch 'tab-completion' of https://github.com/jonsequitur/cli into tab-completion

This commit is contained in:
jonsequitur 2017-03-16 08:32:43 -07:00
commit 9318e8f10d
6 changed files with 15 additions and 9 deletions

View file

@ -11,6 +11,8 @@ namespace Microsoft.DotNet.Tools.Run
public const string CommandOptionProjectDescription = "The path to the project file to run (defaults to the current directory if there is only one project).";
public const string CommandOptionNoBuildDescription = "Skip building the project prior to running. By default, the project will be built.";
public const string RunCommandException = "The build failed. Please fix the build errors and run again.";
public const string RunCommandExceptionUnableToRun = "Unable to run your project\nPlease ensure you have a runnable project type and ensure '{0}' supports this project.\nThe current {1} is '{2}'";

View file

@ -31,6 +31,10 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-p|--project",
LocalizableStrings.CommandOptionProjectDescription,
Accept.ExactlyOneArgument()));
Accept.ExactlyOneArgument()),
Create.Option(
"--no-build",
LocalizableStrings.CommandOptionNoBuildDescription,
Accept.NoArguments().ForwardAs("/p:NoBuild=true")));
}
}
}

View file

@ -67,7 +67,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
string msg1 = "Unhandled Exception: AppThrowing.MyException: "
+ "Exception of type 'AppThrowing.MyException' was thrown.";
string msg2 = "at AppThrowing.MyException.Main(String[] args)";
new TestCommand("dotnet")
new DotnetCommand()
.WithWorkingDirectory(appWithToolDepRoot)
.ExecuteWithCapturedOutput("throwingtool")
.Should().Fail()

View file

@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.0")
.GetFile($"{testAppName}.dll");
var outputRunCommand = new TestCommand("dotnet");
var outputRunCommand = new DotnetCommand();
outputRunCommand.ExecuteWithCapturedOutput(outputDll.FullName)
.Should().Pass()
@ -72,7 +72,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
SearchOption.TopDirectoryOnly)
.Single();
var outputRunCommand = new TestCommand("dotnet");
var outputRunCommand = new DotnetCommand();
outputRunCommand.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()

View file

@ -63,7 +63,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()
@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.ExecuteWithCapturedOutput(outputDll)
.Should().Fail()
.And.HaveStdErrContaining("assembly specified in the dependencies manifest was not found -- package: 'newtonsoft.json',");
@ -160,7 +160,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()

View file

@ -38,7 +38,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.0", "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()
.And.HaveStdOutContaining("Hello World");