add tests for a test app with unicode characters in the path

This commit is contained in:
Bryan Thornbury 2016-04-20 12:43:34 -07:00 committed by Eric Erhardt
parent 5c8ef57585
commit 7a7b524b34
4 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View 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": {}
}
}

View file

@ -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")]

View 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();
}
}
}