dotnet-installer/test/Microsoft.DotNet.Compiler.Common.Tests/GivenCommonCompilerOptions.cs
Piotr Puszkiewicz fe5119fde4 Piotrp msft/merge2msbuild (#3923)
* Add Test for removing readonly flag when copying readonly library assets

* change namespace

* PR Feedback

* Update README.md (#3904)

* Update README.md

* Responding to PR feedback

* Responding to PR feedback
2016-07-23 13:38:31 -04:00

35 lines
1.2 KiB
C#

// 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 Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
namespace Microsoft.DotNet.Cli.Compiler.Common.Tests
{
public class GivenCommonCompilerOptions : TestBase
{
[Fact]
public void SimpleSerialize()
{
var options = new CommonCompilerOptions();
options.AdditionalArguments = new[] { "-highentropyva+" };
var args = options.SerializeToArgs();
Assert.Equal(new [] { "--additional-argument:-highentropyva+" }, args);
}
[Fact]
public void WithSpaces()
{
var options = new CommonCompilerOptions();
options.AdditionalArguments = new[] { "-highentropyva+", "-addmodule:\"path with spaces\";\"after semicolon\"" };
var args = options.SerializeToArgs();
Assert.Equal(new [] {
"--additional-argument:-highentropyva+",
"--additional-argument:-addmodule:\"path with spaces\";\"after semicolon\""
}, args);
}
}
}