Skip to content

MTP2 response file parser cannot parse arguments with quotes and spaces #7264

@MaceWindu

Description

@MaceWindu

Describe the bug

It is not possible to put large test filters to rsp files if they have spaces and quotes

Steps To Reproduce

Test (using NUnit adapter)

using NUnit.Framework;

public class Tests
{
    [Test]
    public void Test([Values("test value")] string arg)
    {
        Assert.Pass();
    }
}

Command line (works):

MTP2.exe --filter "FullyQualifiedName=Tests.Test\(\"test value\"\)"

RSP file

--filter "FullyQualifiedName=Tests.Test\(\"test value\"\)"

Calling with rsp file results in filter parsed as multiple arguments

MTP2.exe @rsp
Option '--filter' from provider 'NUnit' (UID: NUnitExtension) expects at most 1 arguments

Expected behavior

works with rsp

Actual behavior

Error

Option '--filter' from provider 'NUnit' (UID: NUnitExtension) expects at most 1 arguments

Metadata

Metadata

Assignees

Labels

Area: MTPBelongs to the Microsoft.Testing.Platform core libraryState: Blocked

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions