Add tests and change to call exec
This commit is contained in:
parent
863f1cd91d
commit
2afe032280
2 changed files with 30 additions and 1 deletions
|
@ -158,7 +158,7 @@ namespace Microsoft.DotNet.Tools.Run
|
|||
// The executable is a ".dll", we need to call it through dotnet.exe
|
||||
var muxer = new Muxer();
|
||||
|
||||
command = Command.Create(muxer.MuxerPath, Enumerable.Concat(new[] { outputName }, _args));
|
||||
command = Command.Create(muxer.MuxerPath, Enumerable.Concat(new[] { "exec", outputName }, _args));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace Microsoft.DotNet.Tools.Run.Tests
|
|||
{
|
||||
public class RunTests : TestBase
|
||||
{
|
||||
private const string PortableAppsTestBase = "PortableTests";
|
||||
private const string RunTestsBase = "RunTestsApps";
|
||||
|
||||
[WindowsOnlyFact]
|
||||
|
@ -40,6 +41,34 @@ namespace Microsoft.DotNet.Tools.Run.Tests
|
|||
new RunCommand(instance.TestRoot).Execute().Should().Fail();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItRunsPortableApps()
|
||||
{
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(PortableAppsTestBase, "PortableApp"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Pass();
|
||||
}
|
||||
|
||||
[Fact(Skip = "https://github.com/dotnet/cli/issues/1940")]
|
||||
public void ItRunsPortableAppsWithNative()
|
||||
{
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(PortableAppsTestBase, "PortableAppWithNative"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItRunsStandaloneApps()
|
||||
{
|
||||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(PortableAppsTestBase, "StandaloneApp"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Pass();
|
||||
}
|
||||
|
||||
|
||||
private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)
|
||||
{
|
||||
// copy all the files to temp dir
|
||||
|
|
Loading…
Reference in a new issue