mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-12-15 01:35:39 +00:00
Compare commits
8 Commits
WoofWare.N
...
WoofWare.N
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1dde56d06 | ||
|
|
c14a63b6e3 | ||
|
|
d448865b85 | ||
|
|
ee7aaea2d1 | ||
|
|
671bd081db | ||
|
|
4acb66a563 | ||
|
|
c9a8748d31 | ||
|
|
ecff89edcf |
20
.github/workflows/dotnet.yaml
vendored
20
.github/workflows/dotnet.yaml
vendored
@@ -209,12 +209,12 @@ jobs:
|
|||||||
- name: Pack
|
- name: Pack
|
||||||
run: nix develop --command dotnet pack --configuration Release
|
run: nix develop --command dotnet pack --configuration Release
|
||||||
- name: Upload NuGet artifact (lib)
|
- name: Upload NuGet artifact (lib)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: nuget-package-lib
|
name: nuget-package-lib
|
||||||
path: WoofWare.NUnitTestRunner.Lib/bin/Release/WoofWare.NUnitTestRunner.Lib.*.nupkg
|
path: WoofWare.NUnitTestRunner.Lib/bin/Release/WoofWare.NUnitTestRunner.Lib.*.nupkg
|
||||||
- name: Upload NuGet artifact (tool)
|
- name: Upload NuGet artifact (tool)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: nuget-package-tool
|
name: nuget-package-tool
|
||||||
path: WoofWare.NUnitTestRunner/bin/Release/WoofWare.NUnitTestRunner.*.nupkg
|
path: WoofWare.NUnitTestRunner/bin/Release/WoofWare.NUnitTestRunner.*.nupkg
|
||||||
@@ -224,7 +224,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download NuGet artifact (lib)
|
- name: Download NuGet artifact (lib)
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget-package-lib
|
name: nuget-package-lib
|
||||||
path: packed-lib
|
path: packed-lib
|
||||||
@@ -232,7 +232,7 @@ jobs:
|
|||||||
# Verify that there is exactly one nupkg in the artifact that would be NuGet published
|
# Verify that there is exactly one nupkg in the artifact that would be NuGet published
|
||||||
run: if [[ $(find packed-lib -maxdepth 1 -name 'WoofWare.NUnitTestRunner.Lib.*.nupkg' -printf c | wc -c) -ne "1" ]]; then exit 1; fi
|
run: if [[ $(find packed-lib -maxdepth 1 -name 'WoofWare.NUnitTestRunner.Lib.*.nupkg' -printf c | wc -c) -ne "1" ]]; then exit 1; fi
|
||||||
- name: Download NuGet artifact (tool)
|
- name: Download NuGet artifact (tool)
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget-package-tool
|
name: nuget-package-tool
|
||||||
path: packed-tool
|
path: packed-tool
|
||||||
@@ -259,7 +259,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Download NuGet artifact
|
- name: Download NuGet artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget-package-lib
|
name: nuget-package-lib
|
||||||
path: packed
|
path: packed
|
||||||
@@ -278,7 +278,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Download NuGet artifact
|
- name: Download NuGet artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget-package-tool
|
name: nuget-package-tool
|
||||||
path: packed
|
path: packed
|
||||||
@@ -304,7 +304,7 @@ jobs:
|
|||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Download NuGet artifact
|
- name: Download NuGet artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget-package-lib
|
name: nuget-package-lib
|
||||||
path: packed
|
path: packed
|
||||||
@@ -341,7 +341,7 @@ jobs:
|
|||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Download NuGet artifact
|
- name: Download NuGet artifact
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: nuget-package-tool
|
name: nuget-package-tool
|
||||||
path: packed
|
path: packed
|
||||||
@@ -372,7 +372,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Download NuGet artifact (tool)
|
- name: Download NuGet artifact (tool)
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact }}
|
name: ${{ matrix.artifact }}
|
||||||
- name: Compute package path
|
- name: Compute package path
|
||||||
@@ -408,7 +408,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Download NuGet artifact (tool)
|
- name: Download NuGet artifact (tool)
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact }}
|
name: ${{ matrix.artifact }}
|
||||||
- name: Compute package path
|
- name: Compute package path
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<WarnOn>FS3388,FS3559</WarnOn>
|
<WarnOn>FS3388,FS3559</WarnOn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" PrivateAssets="all" />
|
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Condition="'$(GITHUB_ACTION)' != ''">
|
<PropertyGroup Condition="'$(GITHUB_ACTION)' != ''">
|
||||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ module internal Lexer =
|
|||||||
i <- i + 1
|
i <- i + 1
|
||||||
| _ ->
|
| _ ->
|
||||||
yield Token.single TokenType.Not startI 1
|
yield Token.single TokenType.Not startI 1
|
||||||
i <- i + 1
|
// Don't advance i here - we only consumed the '!' character
|
||||||
|
()
|
||||||
| Token.SingleChar token, State.Awaiting ->
|
| Token.SingleChar token, State.Awaiting ->
|
||||||
i <- i + 1
|
i <- i + 1
|
||||||
yield token
|
yield token
|
||||||
@@ -162,7 +163,7 @@ module internal ParsedFilter =
|
|||||||
|
|
||||||
match token.Type with
|
match token.Type with
|
||||||
| TokenType.QuotedString ->
|
| TokenType.QuotedString ->
|
||||||
// +1 and -1, because the trivia contains the initial and terminal quote mark
|
// +1 to skip the initial quote; len includes the initial quote but excludes the terminal quote
|
||||||
inputString.Substring (start + 1, len - 1)
|
inputString.Substring (start + 1, len - 1)
|
||||||
|> unescape
|
|> unescape
|
||||||
|> ParsedFilter.String
|
|> ParsedFilter.String
|
||||||
@@ -196,7 +197,12 @@ module internal ParsedFilter =
|
|||||||
ConsumeBeforeInitialToken = false
|
ConsumeBeforeInitialToken = false
|
||||||
ConsumeAfterFinalToken = false
|
ConsumeAfterFinalToken = false
|
||||||
BoundaryTokens = [ TokenType.CloseParen ]
|
BoundaryTokens = [ TokenType.CloseParen ]
|
||||||
Construct = List.exactlyOne
|
Construct =
|
||||||
|
fun l ->
|
||||||
|
match List.tryExactlyOne l with
|
||||||
|
| None -> failwith "expected exactly one token in stream"
|
||||||
|
| Some None -> failwith "expected parens to have contents"
|
||||||
|
| Some (Some x) -> x
|
||||||
}
|
}
|
||||||
|
|
||||||
let parse (s : string) : ParsedFilter =
|
let parse (s : string) : ParsedFilter =
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<EmbeddedResource Include="version.json" />
|
<EmbeddedResource Include="version.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="WoofWare.PrattParser" Version="0.2.5" />
|
<PackageReference Include="WoofWare.PrattParser" Version="0.3.1" />
|
||||||
<PackageReference Update="FSharp.Core" Version="6.0.1" />
|
<PackageReference Update="FSharp.Core" Version="6.0.1" />
|
||||||
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.12" />
|
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.12" />
|
||||||
<PackageReference Include="Myriad.SDK" Version="0.8.3" PrivateAssets="all" />
|
<PackageReference Include="Myriad.SDK" Version="0.8.3" PrivateAssets="all" />
|
||||||
|
|||||||
@@ -123,3 +123,15 @@ module TestFilter =
|
|||||||
[<TestCaseSource(nameof xmlExamples)>]
|
[<TestCaseSource(nameof xmlExamples)>]
|
||||||
let ``XML examples`` (example : string, expected : Filter) =
|
let ``XML examples`` (example : string, expected : Filter) =
|
||||||
Filter.parse example |> shouldEqual expected
|
Filter.parse example |> shouldEqual expected
|
||||||
|
|
||||||
|
let negationExamples =
|
||||||
|
[
|
||||||
|
"!Name=foo", Filter.Not (Filter.Name (Match.Exact "foo"))
|
||||||
|
"!FullyQualifiedName=bar", Filter.Not (Filter.FullyQualifiedName (Match.Exact "bar"))
|
||||||
|
"!TestCategory=baz", Filter.Not (Filter.TestCategory (Match.Exact "baz"))
|
||||||
|
]
|
||||||
|
|> List.map TestCaseData
|
||||||
|
|
||||||
|
[<TestCaseSource(nameof negationExamples)>]
|
||||||
|
let ``Negation examples`` (example : string, expected : Filter) =
|
||||||
|
Filter.parse example |> shouldEqual expected
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ApiSurface" Version="5.0.2" />
|
<PackageReference Include="ApiSurface" Version="5.0.2" />
|
||||||
<PackageReference Include="FsCheck" Version="3.3.1" />
|
<PackageReference Include="FsCheck" Version="3.3.2" />
|
||||||
<PackageReference Include="FsUnit" Version="7.1.1" />
|
<PackageReference Include="FsUnit" Version="7.1.1" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Spectre.Console" Version="0.52.0" />
|
<PackageReference Include="Spectre.Console" Version="0.53.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760596604,
|
"lastModified": 1762361079,
|
||||||
"narHash": "sha256-J/i5K6AAz/y5dBePHQOuzC7MbhyTOKsd/GLezSbEFiM=",
|
"narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3cbe716e2346710d6e1f7c559363d14e11c32a43",
|
"rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "FsCheck",
|
"pname": "FsCheck",
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"hash": "sha256-k65ksdOSOGz+meRUUND+yuqJtm5ChaKuaxmRIdKzx2Y="
|
"hash": "sha256-3ydyTGpqySynjbcWbmFVeCBnT3KDH3miPSJYJlyxrGs="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "fsharp-analyzers",
|
"pname": "fsharp-analyzers",
|
||||||
@@ -211,8 +211,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "Nerdbank.GitVersioning",
|
"pname": "Nerdbank.GitVersioning",
|
||||||
"version": "3.8.118",
|
"version": "3.9.50",
|
||||||
"hash": "sha256-Hmyy0ZKOmwN4zIhI4+MqoN8geZNc1sd033aZJ6APrO8="
|
"hash": "sha256-BiBfXwr8ob2HTaFk2L5TwAgtvd/EPoqudSI9nhAjQPI="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "Newtonsoft.Json",
|
"pname": "Newtonsoft.Json",
|
||||||
@@ -276,8 +276,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "Spectre.Console",
|
"pname": "Spectre.Console",
|
||||||
"version": "0.52.0",
|
"version": "0.53.0",
|
||||||
"hash": "sha256-enGa3do7uHQFJOGha+IJZB/rlYhZDvLYbNYgZ4B5V8g="
|
"hash": "sha256-XnzZoDD32DZqK/tmPVaXaclJJzb25SyMLzQ7xX3XLQw="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "System.Collections.Immutable",
|
"pname": "System.Collections.Immutable",
|
||||||
@@ -361,8 +361,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "WoofWare.PrattParser",
|
"pname": "WoofWare.PrattParser",
|
||||||
"version": "0.2.5",
|
"version": "0.3.1",
|
||||||
"hash": "sha256-6+74AMxVIBa5rYO34Hlm02zPtRSvpcvUA6cqeYB3WoQ="
|
"hash": "sha256-y1m9gTNH1ECDHSFpjWBDkJz7uAQmzp64eGIW3d7hoZQ="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pname": "WoofWare.Whippet.Fantomas",
|
"pname": "WoofWare.Whippet.Fantomas",
|
||||||
|
|||||||
Reference in New Issue
Block a user