Adding a CLI Test: Execute a 1.0 tool in a netcoreapp1.1 project

https://github.com/dotnet/cli/issues/6229
This commit is contained in:
John Beisner 2017-04-14 09:40:46 -07:00
parent 6f57f27621
commit f56306cc62
8 changed files with 144 additions and 0 deletions

View file

@ -78,6 +78,25 @@ namespace Microsoft.DotNet.Cli.Build.Tests
.Should().Pass();
}
[Theory]
[InlineData("netcoreapp1.0")]
public void ItRunsABackwardsVersionedTool(string target)
{
var testInstance = TestAssets.Get("TestAppWithCLIToolReferences")
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
var testProjectDirectory = testInstance.Root;
new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput("outputsframeworkversion-" + target)
.Should()
.Pass()
.And
.HaveStdOutContaining(target);
}
void ChangeProjectTargetFramework(FileInfo projectFile, string target)
{