add tests for a test app with unicode characters in the path
This commit is contained in:
parent
5c8ef57585
commit
7a7b524b34
4 changed files with 81 additions and 0 deletions
12
TestAssets/TestProjects/TestAppWithUnicodéPath/Program.cs
Normal file
12
TestAssets/TestProjects/TestAppWithUnicodéPath/Program.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace ConsoleApplication
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
22
TestAssets/TestProjects/TestAppWithUnicodéPath/project.json
Normal file
22
TestAssets/TestProjects/TestAppWithUnicodéPath/project.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0-rc2-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": { }
|
||||
},
|
||||
"runtimes": {
|
||||
"win7-x64": {},
|
||||
"win7-x86": {},
|
||||
"osx.10.10-x64": {},
|
||||
"osx.10.11-x64": {},
|
||||
"ubuntu.14.04-x64": {},
|
||||
"centos.7-x64": {},
|
||||
"rhel.7.2-x64": {},
|
||||
"debian.8-x64": {}
|
||||
}
|
||||
}
|
|
@ -51,6 +51,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
/// <param name="testUserArgument"></param>
|
||||
[Theory]
|
||||
[InlineData(@"""abc"" d e")]
|
||||
[InlineData(@"""ábc"" d é")]
|
||||
[InlineData(@"""abc"" d e")]
|
||||
[InlineData("\"abc\"\t\td\te")]
|
||||
[InlineData(@"a\\b d""e f""g h")]
|
||||
|
|
46
test/dotnet-build.Tests/GivenDotnetBuildBuildsProjects.cs
Normal file
46
test/dotnet-build.Tests/GivenDotnetBuildBuildsProjects.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
// 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;
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Builder.Tests
|
||||
{
|
||||
public class GivenDotnetBuildBuildsProjects : TestBase
|
||||
{
|
||||
[Fact]
|
||||
public void It_builds_projects_with_Unicode_in_path()
|
||||
{
|
||||
var testInstance = TestAssetsManager
|
||||
.CreateTestInstance("TestAppWithUnicodéPath")
|
||||
.WithLockFiles();
|
||||
|
||||
var testProjectDirectory = testInstance.TestRoot;
|
||||
|
||||
var buildCommand = new BuildCommand("");
|
||||
buildCommand.WorkingDirectory = testProjectDirectory;
|
||||
|
||||
buildCommand.ExecuteWithCapturedOutput()
|
||||
.Should()
|
||||
.Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void It_builds_projects_with_Unicode_in_path_project_path_passed()
|
||||
{
|
||||
var testInstance = TestAssetsManager
|
||||
.CreateTestInstance("TestAppWithUnicodéPath")
|
||||
.WithLockFiles();
|
||||
|
||||
var testProject = Path.Combine(testInstance.TestRoot, "project.json");
|
||||
|
||||
new BuildCommand(testProject)
|
||||
.ExecuteWithCapturedOutput()
|
||||
.Should()
|
||||
.Pass();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue