diff --git a/src/NUnitEngine/nunit.engine.tests/Services/TestSelectionParserTests.cs b/src/NUnitEngine/nunit.engine.tests/Services/TestSelectionParserTests.cs index a067bc972..47500507a 100644 --- a/src/NUnitEngine/nunit.engine.tests/Services/TestSelectionParserTests.cs +++ b/src/NUnitEngine/nunit.engine.tests/Services/TestSelectionParserTests.cs @@ -1,10 +1,8 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt +using NUnit.Framework; using System; -using System.Collections.Generic; -using System.Text; using System.Xml; -using NUnit.Framework; namespace NUnit.Engine.Tests { @@ -40,6 +38,7 @@ public void CreateParser() [TestCase("test='My.Test.Fixture.Method(\"abc\\'s\")'", "My.Test.Fixture.Method("abc's")")] [TestCase("test='My.Test.Fixture.Method(\"x&y&z\")'", "My.Test.Fixture.Method("x&y&z")")] [TestCase("test='My.Test.Fixture.Method(\"\")'", "My.Test.Fixture.Method("<xyz>")")] + [TestCase("test=='Issue1510.TestSomething(Option1,\"ABC\")'", "Issue1510.TestSomething(Option1,"ABC")")] [TestCase("cat==Urgent && test=='My.Tests'", "UrgentMy.Tests")] [TestCase("cat==Urgent and test=='My.Tests'", "UrgentMy.Tests")] [TestCase("cat==Urgent || test=='My.Tests'", "UrgentMy.Tests")] diff --git a/src/NUnitEngine/nunit.engine.tests/Services/TokenizerTests.cs b/src/NUnitEngine/nunit.engine.tests/Services/TokenizerTests.cs index 29c826a76..4d5ad1818 100644 --- a/src/NUnitEngine/nunit.engine.tests/Services/TokenizerTests.cs +++ b/src/NUnitEngine/nunit.engine.tests/Services/TokenizerTests.cs @@ -1,8 +1,5 @@ // Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt -using System; -using System.Collections.Generic; -using System.Text; using NUnit.Framework; namespace NUnit.Engine.Tests @@ -75,6 +72,16 @@ public void StringWithSlashes() Assert.That(tokenizer.NextToken(), Is.EqualTo(new Token(TokenKind.Eof))); } + [Test] + public void TestNameWithParameters() + { + var tokenizer = new Tokenizer("test=='Issue1510.TestSomething(Option1,\"ABC\")'"); + Assert.That(tokenizer.NextToken(), Is.EqualTo(new Token(TokenKind.Word, "test"))); + Assert.That(tokenizer.NextToken(), Is.EqualTo(new Token(TokenKind.Symbol, "=="))); + Assert.That(tokenizer.NextToken(), Is.EqualTo(new Token(TokenKind.String, "Issue1510.TestSomething(Option1,\"ABC\")"))); + Assert.That(tokenizer.NextToken(), Is.EqualTo(new Token(TokenKind.Eof))); + } + [Test] public void StringsMayContainEscapedQuoteChar() {