Making argument forwarding tests run with dotnet test and removing the its special test scripts.
This commit is contained in:
parent
5c0eb19859
commit
64c17c5541
12 changed files with 36 additions and 119 deletions
|
@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
{
|
||||
public class ArgumentForwardingTests : TestBase
|
||||
{
|
||||
private static readonly string s_reflectorExeName = "Reflector" + Constants.ExeSuffix;
|
||||
private static readonly string s_reflectorExeName = "ArgumentsReflector" + Constants.ExeSuffix;
|
||||
private static readonly string s_reflectorCmdName = "reflector_cmd";
|
||||
|
||||
private string ReflectorPath { get; set; }
|
||||
|
@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
{
|
||||
Console.WriteLine("Dummy Entrypoint.");
|
||||
}
|
||||
|
||||
|
||||
public ArgumentForwardingTests()
|
||||
{
|
||||
// This test has a dependency on an argument reflector
|
||||
|
@ -135,7 +135,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
{
|
||||
var rawArg = rawEvaluatedArgument[i];
|
||||
var escapedArg = escapedEvaluatedRawArgument[i];
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
rawArg.Should().Be(escapedArg);
|
||||
|
@ -175,7 +175,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
/// <summary>
|
||||
/// EscapeAndEvaluateArgumentString returns a representation of string[] args
|
||||
/// when rawEvaluatedArgument is passed as an argument to a process using
|
||||
/// Command.Create(). Ideally this should escape the argument such that
|
||||
/// Command.Create(). Ideally this should escape the argument such that
|
||||
/// the output is == rawEvaluatedArgument.
|
||||
/// </summary>
|
||||
/// <param name="rawEvaluatedArgument">A string[] representing string[] args as already evaluated by a process</param>
|
||||
|
@ -195,7 +195,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
/// <summary>
|
||||
/// EscapeAndEvaluateArgumentString returns a representation of string[] args
|
||||
/// when rawEvaluatedArgument is passed as an argument to a process using
|
||||
/// Command.Create(). Ideally this should escape the argument such that
|
||||
/// Command.Create(). Ideally this should escape the argument such that
|
||||
/// the output is == rawEvaluatedArgument.
|
||||
/// </summary>
|
||||
/// <param name="rawEvaluatedArgument">A string[] representing string[] args as already evaluated by a process</param>
|
||||
|
@ -218,7 +218,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
|
||||
/// <summary>
|
||||
/// Parse the output of the reflector into a string array.
|
||||
/// Reflector output is simply string[] args written to
|
||||
/// Reflector output is simply string[] args written to
|
||||
/// one string separated by commas.
|
||||
/// </summary>
|
||||
/// <param name="reflectorOutput"></param>
|
||||
|
@ -230,7 +230,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
|
||||
/// <summary>
|
||||
/// Parse the output of the reflector into a string array.
|
||||
/// Reflector output is simply string[] args written to
|
||||
/// Reflector output is simply string[] args written to
|
||||
/// one string separated by commas.
|
||||
/// </summary>
|
||||
/// <param name="reflectorOutput"></param>
|
||||
|
@ -262,7 +262,7 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
|||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = s_reflectorExeName,
|
||||
FileName = ReflectorPath,
|
||||
Arguments = testUserArgument,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library" : "1.0.0-rc2-23811",
|
||||
"Microsoft.NETCore.TestHost": "1.0.0-rc2-23811",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-00153",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.ProjectModel": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": { "target": "project" },
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,21 +6,22 @@
|
|||
|
||||
"dependencies": {
|
||||
"NETStandard.Library" : "1.0.0-rc2-23811",
|
||||
"Microsoft.NETCore.TestHost": "1.0.0-rc2-23811",
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"xunit.console.netcore": "1.0.2-prerelease-00101",
|
||||
"xunit.netcore.extensions": "1.0.0-prerelease-00153",
|
||||
"xunit.runner.utility": "2.1.0",
|
||||
|
||||
"Microsoft.DotNet.ProjectModel": { "target": "project" },
|
||||
"Microsoft.DotNet.Cli.Utils": { "target": "project" },
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }
|
||||
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" },
|
||||
|
||||
"xunit": "2.1.0",
|
||||
"dotnet-test-xunit": "1.0.0-dev-48273-16"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"testRunner": "xunit",
|
||||
|
||||
"scripts": { "precompile": "dotnet build ../ArgumentsReflector/project.json --framework dnxcore50 --output %compile:RuntimeOutputDir%" }
|
||||
}
|
|
@ -2,17 +2,6 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Xunit;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.ProjectModel;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using System.Diagnostics;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace Microsoft.DotNet.Tests.ArgumentForwarding
|
||||
{
|
18
test/ArgumentsReflector/project.json
Normal file
18
test/ArgumentsReflector/project.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"NETStandard.Library" : "1.0.0-rc2-23811"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"dnxcore50": {
|
||||
"imports": "portable-net45+win8"
|
||||
}
|
||||
},
|
||||
|
||||
"content": ["reflector_cmd.cmd"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue