mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-12-15 01:35:39 +00:00
Compare commits
4 Commits
WoofWare.N
...
WoofWare.N
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1dde56d06 | ||
|
|
c14a63b6e3 | ||
|
|
d448865b85 | ||
|
|
ee7aaea2d1 |
@@ -10,7 +10,7 @@
|
||||
<WarnOn>FS3388,FS3559</WarnOn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" PrivateAssets="all" />
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTION)' != ''">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
|
||||
@@ -108,7 +108,8 @@ module internal Lexer =
|
||||
i <- i + 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 ->
|
||||
i <- i + 1
|
||||
yield token
|
||||
@@ -162,7 +163,7 @@ module internal ParsedFilter =
|
||||
|
||||
match token.Type with
|
||||
| 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)
|
||||
|> unescape
|
||||
|> ParsedFilter.String
|
||||
@@ -196,7 +197,12 @@ module internal ParsedFilter =
|
||||
ConsumeBeforeInitialToken = false
|
||||
ConsumeAfterFinalToken = false
|
||||
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 =
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<EmbeddedResource Include="version.json" />
|
||||
</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 Include="WoofWare.DotnetRuntimeLocator" Version="0.1.12" />
|
||||
<PackageReference Include="Myriad.SDK" Version="0.8.3" PrivateAssets="all" />
|
||||
|
||||
@@ -123,3 +123,15 @@ module TestFilter =
|
||||
[<TestCaseSource(nameof xmlExamples)>]
|
||||
let ``XML examples`` (example : string, expected : Filter) =
|
||||
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>
|
||||
<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="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1761349956,
|
||||
"narHash": "sha256-tH3wHnOJms+U4k/rK2Nn1RfBrhffX92jLP/2VndSn0w=",
|
||||
"lastModified": 1762361079,
|
||||
"narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "02f2cb8e0feb4596d20cc52fda73ccee960e3538",
|
||||
"rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "FsCheck",
|
||||
"version": "3.3.1",
|
||||
"hash": "sha256-k65ksdOSOGz+meRUUND+yuqJtm5ChaKuaxmRIdKzx2Y="
|
||||
"version": "3.3.2",
|
||||
"hash": "sha256-3ydyTGpqySynjbcWbmFVeCBnT3KDH3miPSJYJlyxrGs="
|
||||
},
|
||||
{
|
||||
"pname": "fsharp-analyzers",
|
||||
@@ -211,8 +211,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "Nerdbank.GitVersioning",
|
||||
"version": "3.8.118",
|
||||
"hash": "sha256-Hmyy0ZKOmwN4zIhI4+MqoN8geZNc1sd033aZJ6APrO8="
|
||||
"version": "3.9.50",
|
||||
"hash": "sha256-BiBfXwr8ob2HTaFk2L5TwAgtvd/EPoqudSI9nhAjQPI="
|
||||
},
|
||||
{
|
||||
"pname": "Newtonsoft.Json",
|
||||
@@ -361,8 +361,8 @@
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.PrattParser",
|
||||
"version": "0.2.5",
|
||||
"hash": "sha256-6+74AMxVIBa5rYO34Hlm02zPtRSvpcvUA6cqeYB3WoQ="
|
||||
"version": "0.3.1",
|
||||
"hash": "sha256-y1m9gTNH1ECDHSFpjWBDkJz7uAQmzp64eGIW3d7hoZQ="
|
||||
},
|
||||
{
|
||||
"pname": "WoofWare.Whippet.Fantomas",
|
||||
|
||||
Reference in New Issue
Block a user