Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestCase with enclosed double quotes error #582

Closed
eberzosa opened this issue Dec 24, 2018 · 4 comments
Closed

TestCase with enclosed double quotes error #582

eberzosa opened this issue Dec 24, 2018 · 4 comments

Comments

@eberzosa
Copy link

A TestCase with a double quote generates the following error:

An exception occurred while invoking executor 'executor://nunit3testexecutor/': Incorrect format for TestCaseFilter Error: Missing '('. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.

Replacing the " with any other char will make the error disappear.

  • NUnit 3.11.0, NUnit3TestAdapter 3.12.0
  • Visual Studio Enterprise 2017 15.9.4
  • Net 4.6.1
   public class Test
   {
      [TestCase("(c\\\\c)", "")]
      [TestCase("aaa(c\\\\c)bbb", "aaa bbb")]
      [TestCase("aaa (c\\\\c) bbb", "aaa bbb")]
      [TestCase("aaa  (c\\\\c)  bbb", "aaa bbb")]
      [TestCase("aaa\t(c\\\\c)\tbbb", "aaa\tbbb")]
      [TestCase("aaa\t\"(c\\\\c)\"\tbbb", "aaa\t\"(c\\\\c)\"\tbbb")]
      [TestCase("aaa\t\"(c\\\\c)\tbbb", "aaa\t\" bbb")]
      public void TestA(string s1, string s2)
      {

      }
   }
@OsirisTerje
Copy link
Member

This is the same as other reported issues regarding handling "invalid" characters .

@ryanbowden
Copy link

We are having the same issue with having () in the test fixture. Is there a fix incoming for this?

@johnmwright
Copy link
Contributor

This issue has the same underlying cause as #622 and is resolved by PR #668

@OsirisTerje OsirisTerje added this to the 3.16 milestone Oct 31, 2019
@OsirisTerje
Copy link
Member

I assumed this was the same as #622, but when trying now to repro it with the packages set here (NUnit 3.11.0, NUnit3TestAdapter 3.12.0
Visual Studio Enterprise 2017 15.9.4
Net 4.6.1). I can't repro it. I've tried both old style csproj and new style.
image

But since it should work now with 3.16.0-dev in any case, I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants