cucumber / tag-expressions Goto Github PK
View Code? Open in Web Editor NEWCucumber tag expression parser
License: MIT License
Cucumber tag expression parser
License: MIT License
When we merged cucumber/common#1782 (before the code was moved to this repo) we forgot to verify that the new escaping rules were documented (in the README.md). We should document the rules.
If a tag-expression contains a not
operator that encapsulate a binary operator (and
, or
),
the string conversion currently leads to double-parenthesis (unnecessary tautology).
This makes the textual string less readable and understandable.
EXAMPLE:
# SOURCE: testdata/parsing.yml
# HINT: This data or similar examples are currently missing
- expression: 'not (a and b)'
formatted.currently: 'not ( ( a and b ) )'
formatted.should_be: 'not ( a and b )'
REASONS:
not
operator does the same (as it currently is implemented), we get two groups of parenthensisAFFECTED:
Only one parenthesis grouping, like the formatted.should_be
case shown in the example above.
I added additional case to the testdata/parsing.yml
in my local workspace and run Java, Javascript and Go implementations.
Each failed the new additional tests.
The non-tested implementations (Ruby and Perl) are also be affected (as expected), by inspection of their implementation.
Add the following test-data items to testdata/parsing.yml
:
# SOURCE: testdata/parsing.yml
# BAD_EXAMPLES (how the string output currently is):
- expression: 'not (a and b)'
formatted: 'not ( ( a and b ) )'
- expression: 'not (a or b)'
formatted: 'not ( ( a or b ) )'
- expression: 'not (a and b) and c or not (d or f)'
formatted: '( ( not ( ( a and b ) ) and c ) or not ( ( d or f ) ) )'
# GOOD_EXAMPLES (how the output should be):
- expression: 'not (a and b)'
formatted: 'not ( a and b )'
- expression: 'not (a or b)'
formatted: 'not ( a or b )'
- expression: 'not (a and b) and c or not (d or f)'
formatted: '( ( not ( a and b ) and c ) or not ( d or f ) )'
Steps to reproduce the behavior:
Nope.
We've adopted a release process based on GitHub Actions - documented in RELEASING.md
In order to automate Perl releases, we need a new .github/workflows/release-cpan.yml
In #9 we introduced shared test data. The Perl implementation should be updated to:
testdata/*.yml
This issue provides visibility into Renovate updates and their statuses. Learn more
This repository currently has no open or pending branches.
Refs. cucumber/common#1778
Refs. cucumber/common#1782
There are at least two PRs on the monorepo for the tag-expressions module.
We will have to migrate them at some point.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: ^*.gemspec
Error type: Invalid regular expression: ^*.gemspec
In #9 we introduced shared test data. The Python implementation should be updated to:
testdata/*.yml
We've adopted a release process based on GitHub Actions - documented in RELEASING.md
In order to automate Python releases, we need a new .github/workflows/release-pypi.yml
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.