WIP
This commit is contained in:
parent
da15d5435f
commit
161b10d0d0
5 changed files with 44 additions and 44 deletions
|
@ -87,7 +87,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
/// This is a critical scenario for the driver.
|
||||
/// </summary>
|
||||
/// <param name="testUserArgument"></param>
|
||||
[Theory]
|
||||
[WindowsOnlyTheory]
|
||||
[InlineData(@"""abc"" d e")]
|
||||
[InlineData(@"""abc"" d e")]
|
||||
[InlineData("\"abc\"\t\td\te")]
|
||||
|
@ -101,11 +101,6 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
[InlineData(@"a b c""def")]
|
||||
public void TestArgumentForwardingCmd(string testUserArgument)
|
||||
{
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Baseline Argument Evaluation via Reflector
|
||||
// This does not need to be different for cmd because
|
||||
// it only establishes what the string[] args should be
|
||||
|
@ -148,18 +143,13 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[WindowsOnlyTheory]
|
||||
[InlineData(@"a\""b c d")]
|
||||
[InlineData(@"a\\\""b c d")]
|
||||
[InlineData(@"""\a\"" \\""\\\ b c")]
|
||||
[InlineData(@"a\""b \\ cd ""\e f\"" \\""\\\")]
|
||||
public void TestArgumentForwardingCmdFailsWithUnbalancedQuote(string testArgString)
|
||||
{
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Baseline Argument Evaluation via Reflector
|
||||
// This does not need to be different for cmd because
|
||||
// it only establishes what the string[] args should be
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
using Microsoft.DotNet.PlatformAbstractions;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public class NonWindowsOnlyFactAttribute : FactAttribute
|
||||
{
|
||||
public NonWindowsOnlyFactAttribute()
|
||||
{
|
||||
if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows)
|
||||
{
|
||||
this.Skip = "This test requires windows to run";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,15 +16,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class WindowsOnlyTheoryAttribute : TheoryAttribute
|
||||
{
|
||||
public WindowsOnlyTheoryAttribute()
|
||||
{
|
||||
if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows)
|
||||
{
|
||||
this.Skip = "This test requires windows to run";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
using Microsoft.DotNet.PlatformAbstractions;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public class WindowsOnlyTheoryAttribute : TheoryAttribute
|
||||
{
|
||||
public WindowsOnlyTheoryAttribute()
|
||||
{
|
||||
if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows)
|
||||
{
|
||||
this.Skip = "This test requires windows to run";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,8 +36,8 @@ namespace Microsoft.DotNet.Tests
|
|||
var projectOutputPath = $"AppWithProjTool2Fx\\bin\\Debug\\net451\\{rid}\\dotnet-desktop-and-portable.exe";
|
||||
return new[]
|
||||
{
|
||||
new object[] { "CoreFX", ".NETCoreApp,Version=v1.0", "lib\\netcoreapp1.0\\dotnet-desktop-and-portable.dll", true },
|
||||
new object[] { "NetFX", ".NETFramework,Version=v4.5.1", projectOutputPath, true }
|
||||
new object[] { "CoreFX", ".NETCoreApp,Version=v1.0", "lib\\netcoreapp1.0\\dotnet-desktop-and-portable.dll" },
|
||||
new object[] { "NetFX", ".NETFramework,Version=v4.5.1", projectOutputPath }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ namespace Microsoft.DotNet.Tests
|
|||
|
||||
return new[]
|
||||
{
|
||||
new object[] { "CoreFX", ".NETStandard,Version=v1.6", "lib\\netstandard1.6\\dotnet-desktop-and-portable.dll", true },
|
||||
new object[] { "NetFX", ".NETFramework,Version=v4.5.1", projectOutputPath, true }
|
||||
new object[] { "CoreFX", ".NETStandard,Version=v1.6", "lib\\netstandard1.6\\dotnet-desktop-and-portable.dll" },
|
||||
new object[] { "NetFX", ".NETFramework,Version=v4.5.1", projectOutputPath }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -197,16 +197,10 @@ namespace Microsoft.DotNet.Tests
|
|||
.And.NotHaveStdErr();
|
||||
}
|
||||
|
||||
// need conditional theories so we can skip on non-Windows
|
||||
//[Theory(Skip="https://github.com/dotnet/cli/issues/4514")]
|
||||
//[MemberData("DependencyToolArguments")]
|
||||
public void TestFrameworkSpecificDependencyToolsCanBeInvoked(string identifier, string framework, string expectedDependencyToolPath, bool windowsOnly)
|
||||
[WindowsOnlyTheory(Skip="https://github.com/dotnet/cli/issues/4514")]
|
||||
[MemberData("DependencyToolArguments")]
|
||||
public void TestFrameworkSpecificDependencyToolsCanBeInvoked(string identifier, string framework, string expectedDependencyToolPath)
|
||||
{
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && windowsOnly)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
|
||||
.CreateInstance(identifier: identifier)
|
||||
.WithSourceFiles()
|
||||
|
@ -228,15 +222,10 @@ namespace Microsoft.DotNet.Tests
|
|||
.And.Pass();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[WindowsOnlyTheory]
|
||||
[MemberData("LibraryDependencyToolArguments")]
|
||||
public void TestFrameworkSpecificLibraryDependencyToolsCannotBeInvoked(string identifier, string framework, string expectedDependencyToolPath, bool windowsOnly)
|
||||
public void TestFrameworkSpecificLibraryDependencyToolsCannotBeInvoked(string identifier, string framework, string expectedDependencyToolPath)
|
||||
{
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && windowsOnly)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "LibWithProjTool2Fx")
|
||||
.CreateInstance(identifier: identifier)
|
||||
.WithSourceFiles()
|
||||
|
|
Loading…
Reference in a new issue