fix dotnet-compile.deps.json space in the path issue.

add test for space in the path with Preserve Compilation Context

fix project.json

update tests

update test
This commit is contained in:
Bryan 2016-02-18 10:26:00 -08:00
parent c65a1700eb
commit dd103cf6a8
3 changed files with 20 additions and 1 deletions

View file

@ -88,6 +88,24 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
Assert.Contains("CA1018", result.StdErr);
}
[Fact]
public void CompilingAppWithPreserveCompilationContextWithSpaceInThePathShouldSucceed()
{
var root = Temp.CreateDirectory();
var spaceBufferDirectory = root.CreateDirectory("space directory");
var testAppDir = spaceBufferDirectory.CreateDirectory("TestAppCompilationContext");
CopyProjectToTempDir(Path.Combine(_testProjectsRoot, "TestAppCompilationContext"), testAppDir);
var testProjectDir = Path.Combine(_testProjectsRoot, "TestAppCompilationContext", "TestApp");
var testProject = Path.Combine(testProjectDir, "project.json");
var buildCommand = new BuildCommand(testProject);
buildCommand.Execute().Should().Pass();
}
private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)
{
// copy all the files to temp dir