2016-02-16 10:42:45 -08:00
|
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
|
|
|
using Xunit;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Resgen.Tests
|
|
|
|
|
{
|
|
|
|
|
public class ResgenTests : TestBase
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
2016-02-16 10:57:11 -08:00
|
|
|
|
public void Test_Build_Project_with_Resources_with_Space_in_Path_Should_Succeed()
|
2016-02-16 10:42:45 -08:00
|
|
|
|
{
|
2016-08-09 23:15:22 -07:00
|
|
|
|
var testInstance = TestAssetsManager
|
|
|
|
|
.CreateTestInstance("TestProjectWithResource", identifier: "A SPACE")
|
|
|
|
|
.WithBuildArtifacts()
|
|
|
|
|
.WithLockFiles();
|
2016-02-16 10:42:45 -08:00
|
|
|
|
|
2016-08-09 23:15:22 -07:00
|
|
|
|
var testProject = Path.Combine(testInstance.Path, "project.json");
|
|
|
|
|
|
2016-02-16 10:42:45 -08:00
|
|
|
|
var buildCommand = new BuildCommand(testProject);
|
|
|
|
|
|
2016-02-16 10:57:11 -08:00
|
|
|
|
buildCommand.Execute().Should().Pass();
|
2016-02-16 10:42:45 -08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)
|
|
|
|
|
{
|
|
|
|
|
foreach (var file in Directory.EnumerateFiles(projectDir))
|
|
|
|
|
{
|
|
|
|
|
tempDir.CopyFile(file);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string GetProjectPath(TempDirectory projectDir)
|
|
|
|
|
{
|
|
|
|
|
return Path.Combine(projectDir.Path, "project.json");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|