-
-
Notifications
You must be signed in to change notification settings - Fork 10
Add Dotnet Implementation #219
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
base: main
Are you sure you want to change the base?
Changes from 6 commits
61ccca5
f32ad14
5191a32
6d5ffb0
f6544ef
1941994
08614a9
0a67e22
c8df619
4a7282f
d00b994
4dbb567
9b974e9
c43a411
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Release NuGet | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ release/* ] | ||
|
|
||
| jobs: | ||
| publish-nuget: | ||
| name: Publish package to NuGet.org | ||
| # Failing on `ubuntu-24.04` (https://github.com/cucumber/gherkin/issues/349) | ||
| runs-on: ubuntu-22.04 | ||
| environment: Release | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 9.0.x | ||
| - uses: cucumber/[email protected] | ||
| with: | ||
| nuget-api-key: ${{ secrets.NUGET_API_KEY }} | ||
| working-directory: "dotnet" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: test-dotnet | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - renovate/** | ||
| paths: | ||
| - dotnet/** | ||
| - testdata/** | ||
| - .github/** | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - dotnet/** | ||
| - testdata/** | ||
| - .github/** | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| test-dotnet: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: | | ||
| 8.0.x | ||
| 9.0.x | ||
| - run: dotnet test | ||
| working-directory: dotnet |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| root=true | ||
|
|
||
| [*] | ||
| indent_style=space | ||
| end_of_line=crlf | ||
| charset=utf-8 | ||
|
|
||
| [*.{csproj,props}] | ||
| indent_size=2 | ||
|
|
||
| [*.cs] | ||
| indent_size=4 | ||
| insert_final_newline = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| ## Ignore Visual Studio temporary files, build results, and | ||
| ## files generated by popular Visual Studio add-ons. | ||
|
|
||
| # User-specific files | ||
| *.suo | ||
| *.user | ||
| *.sln.docstates | ||
| *.ide | ||
|
|
||
| # Build results | ||
|
|
||
| [Dd]ebug/ | ||
| [Rr]elease/ | ||
| x64/ | ||
| build/ | ||
| [Oo]bj/ | ||
| */**/bin | ||
|
|
||
| # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets | ||
| !packages/*/build/ | ||
|
|
||
| # MSTest test Results | ||
| [Tt]est[Rr]esult*/ | ||
| [Bb]uild[Ll]og.* | ||
|
|
||
| *_i.c | ||
| *_p.c | ||
| *.ilk | ||
| *.meta | ||
| *.obj | ||
| *.pch | ||
| *.pdb | ||
| *.pgc | ||
| *.pgd | ||
| *.rsp | ||
| *.sbr | ||
| *.tlb | ||
| *.tli | ||
| *.tlh | ||
| *.tmp | ||
| *.tmp_proj | ||
| *.log | ||
| *.vspscc | ||
| *.vssscc | ||
| .builds | ||
| *.pidb | ||
| *.log | ||
| *.scc | ||
|
|
||
| # Visual C++ cache files | ||
| ipch/ | ||
| *.aps | ||
| *.ncb | ||
| *.opensdf | ||
| *.sdf | ||
| *.cachefile | ||
|
|
||
| # Visual Studio profiler | ||
| *.psess | ||
| *.vsp | ||
| *.vspx | ||
|
|
||
| # Guidance Automation Toolkit | ||
| *.gpState | ||
|
|
||
| # ReSharper is a .NET coding add-in | ||
| _ReSharper*/ | ||
| *.[Rr]e[Ss]harper | ||
|
|
||
| # TeamCity is a build add-in | ||
| _TeamCity* | ||
|
|
||
| # DotCover is a Code Coverage Tool | ||
| *.dotCover | ||
|
|
||
| # NCrunch | ||
| *.ncrunch* | ||
| .*crunch*.local.xml | ||
|
|
||
| # Installshield output folder | ||
| [Ee]xpress/ | ||
|
|
||
| # DocProject is a documentation generator add-in | ||
| DocProject/buildhelp/ | ||
| DocProject/Help/*.HxT | ||
| DocProject/Help/*.HxC | ||
| DocProject/Help/*.hhc | ||
| DocProject/Help/*.hhk | ||
| DocProject/Help/*.hhp | ||
| DocProject/Help/Html2 | ||
| DocProject/Help/html | ||
|
|
||
| # Click-Once directory | ||
| publish/ | ||
|
|
||
| # Publish Web Output | ||
| *.Publish.xml | ||
|
|
||
| # NuGet Packages Directory | ||
| ## TODO: If you have NuGet Package Restore enabled, uncomment the next line | ||
| #packages/ | ||
|
|
||
| # Windows Azure Build Output | ||
| csx | ||
| *.build.csdef | ||
|
|
||
| # Windows Store app package directory | ||
| AppPackages/ | ||
|
|
||
| # Others | ||
| sql/ | ||
| *.Cache | ||
| ClientBin/ | ||
| [Ss]tyle[Cc]op.* | ||
| ~$* | ||
| *~ | ||
| *.dbmdl | ||
| *.[Pp]ublish.xml | ||
| *.pfx | ||
| *.publishsettings | ||
|
|
||
| # RIA/Silverlight projects | ||
| Generated_Code/ | ||
|
|
||
| # Backup & report files from converting an old project file to a newer | ||
| # Visual Studio version. Backup files are not needed, because we have git ;-) | ||
| _UpgradeReport_Files/ | ||
| Backup*/ | ||
| UpgradeLog*.XML | ||
| UpgradeLog*.htm | ||
|
|
||
| # SQL Server files | ||
| App_Data/*.mdf | ||
| App_Data/*.ldf | ||
|
|
||
|
|
||
| #LightSwitch generated files | ||
| GeneratedArtifacts/ | ||
| _Pvt_Extensions/ | ||
| ModelManifest.xml | ||
|
|
||
| # ========================= | ||
| # Windows detritus | ||
| # ========================= | ||
|
|
||
| # Windows image file caches | ||
| Thumbs.db | ||
| ehthumbs.db | ||
|
|
||
| # Folder config file | ||
| Desktop.ini | ||
|
|
||
| # Recycle Bin used on file shares | ||
| $RECYCLE.BIN/ | ||
|
|
||
| # Mac desktop service store files | ||
| .DS_Store | ||
|
|
||
| packages/ | ||
| acceptance/ | ||
| output/ | ||
| .built | ||
| .compared | ||
| .sln_built_debug | ||
| *.userprefs | ||
| *.nupkg | ||
| Gherkin.NuGetPackages/bin/ | ||
| .build* | ||
| .built* | ||
| .vscode | ||
| .run_tests | ||
| .generated | ||
| .packed | ||
| .tested | ||
| .fixprotoc | ||
| .vs/ | ||
|
|
||
| # ======================== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <LangVersion>13</LangVersion> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also add
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| </PropertyGroup> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) Cucumber Ltd | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [](https://search.maven.org/search?q=g:%22io.cucumber%22%20AND%20a:%22tag-expressions%22) | ||
|
||
|
|
||
| # Cucumber Tag Expressions for .NET | ||
|
|
||
| [The docs are here](https://cucumber.io/docs/cucumber/api/#tag-expressions). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.14.36616.10 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagExpressions", "TagExpressions\TagExpressions.csproj", "{0BDD57B5-52F9-4866-8031-C84E41138453}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagExpressionsTest", "TagExpressionsTest\TagExpressionsTest.csproj", "{EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {0BDD57B5-52F9-4866-8031-C84E41138453}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {EBEAC0FF-9EA0-4065-B39E-B9C4C29EE48A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {0789D1F0-C759-4F1D-BED0-F55A1E05100B} | ||
| EndGlobalSection | ||
| EndGlobal |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| namespace TagExpressions; | ||
|
|
||
| /// <summary> | ||
| /// Represents a tag expression that can be evaluated against a set of input tags. | ||
| /// </summary> | ||
| public interface ITagExpression | ||
| { | ||
| /// <summary> | ||
| /// Evaluates the tag expression against the provided input tags. | ||
| /// </summary> | ||
| /// <param name="inputs">A collection of input tags to evaluate against.</param> | ||
| /// <returns><c>true</c> if the expression matches the inputs; otherwise, <c>false</c>.</returns> | ||
| bool Evaluate(IEnumerable<string> inputs); | ||
|
|
||
| /// <summary> | ||
| /// Returns the string representation of the tag expression. | ||
| /// </summary> | ||
| /// <returns>A string that represents the tag expression.</returns> | ||
| string ToString(); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| namespace TagExpressions | ||
| { | ||
| /// <summary> | ||
| /// Defines a parser for tag expressions. | ||
| /// </summary> | ||
| public interface ITagExpressionParser | ||
| { | ||
| /// <summary> | ||
| /// Parses the specified text into an <see cref="ITagExpression"/>. | ||
| /// </summary> | ||
| /// <param name="text">The tag expression string to parse.</param> | ||
| /// <returns>An <see cref="ITagExpression"/> representing the parsed expression.</returns> | ||
| ITagExpression Parse(string text); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| using System.Runtime.CompilerServices; | ||
|
|
||
| [assembly: InternalsVisibleTo("TagExpressionsTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100bd9b4db256712217f4906b5eb0113e633e319ef574450f83cb837097cac352cfac3a3d3e652c74e2f19e4af0464877e171602bb254fba62c9023894123393ca270ac5c1c01e99e233d0ccdb75f1ebf9b18b66f1618c1d9904658bc7e0a836c5488fb6e54845d9daabbf37594f54bc58f9136fd66cdad9b2761e8710956b2f1ce")] | ||
|
||
Uh oh!
There was an error while loading. Please reload this page.