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

Adding double quotes to filter command line option...plus test #90

Merged
merged 2 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/testCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class TestCommands {
let command = `dotnet test${this.getDotNetTestOptions()}${this.outputTestResults()}`;

if (testName && testName.length) {
command = command + ` --filter FullyQualifiedName~${testName.replace(/\(.*\)/g, "")}`;
command = command + ` --filter "FullyQualifiedName~${testName.replace(/\(.*\)/g, "")}"`;
}

this.lastRunTestName = testName;
Expand Down
18 changes: 18 additions & 0 deletions test/fsxunittests/FSharpTests.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Include="TestClass1.fs"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="Shouldly" Version="3.0.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/fsxunittests/TestClass1.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module FSharpTests

open Xunit
open Shouldly

[<Fact>]
let ``This is a test that has spaces in it's name`` () =
(true).ShouldBe(true)