Comments (4)
It's on the agenda for consideration.
I'm curious how your example is supposed to work though. Currently @ParameterType("^(?:(?:,|;|and|or)?\s?\w+)+$")
shouldn't work because the ^
and $
would match the start and end of line.
from cucumber-expressions.
And the biggest obstacle is going to be getting the CSV parsing/language parsing done right. Imagine a separator that is also part of a product name:
Given the products Dumbo the Flying Elephant, "Spike and Suzy" and Lord of the Rings
Not to mention the Oxford comma, so now we combine two different separators with no products in between:
Given the products Dumbo the Flying Elephant, "Spike and Suzy", and Lord of the Rings
And I have no idea how this works in other languages that aren't English. So it might not be possible to come up with a good solution.
from cucumber-expressions.
I'm curious how your example is supposed to work though. Currently
@ParameterType("^(?:(?:,|;|and|or)?\s?\w+)+$")
shouldn't work because the^
and$
would match the start and end of line.
I tried it without ^ and $, I guess it was kind of an automatism of myself, to add it in my description here. So Please ignore it. 😅
Regarding the other concerns: they are of course tricky, but if it is up to the user to provide possible separators (so no default separators, but explicitly provided ones) and the test data, it might (at least in a first step) simply be the users responsibility to chose both wisely.
If only "," and ";" are provided as separators, neither the language nor the test data itself should be a problem. Also possible would be ignoring separators within quotes, like in your example. The Oxford comma might remain as a problem, as long as it is not also provided as a separator, like
@ParameterType(regex = "\\w+", separators=[",", ";", "and", "or", ", and", ", or"])
fun product(product: String): List<Product> {
return Product(it)
}
from cucumber-expressions.
I'm curious why you want to put this list on a single line, rather than using a single-column DataTable beneath the step?
from cucumber-expressions.
Related Issues (20)
- Return optionals as part of a Cucumber Expression match HOT 4
- java: Not all tests are executed HOT 1
- Remove Python example illustrating how to define parameter types HOT 2
- more powerful optional text HOT 12
- Allow free-form text in optionals HOT 1
- Improve Expression creation performance HOT 2
- Use action-publish-pypi in cucumber-expressions
- Optimize Cucumber expression creation in .Net implementation
- Action Required: Fix Renovate Configuration
- Bad CucumberExpression creation performance HOT 6
- Golang big.Float is not a big decimal HOT 12
- Feature: named capture groups HOT 13
- Missing source for source map
- RegEx "expressions" and defineParameterType feature file examples ?
- Add the ability to ignore a cucumber expression parameter just like a non capturing regex HOT 12
- Nested capture groups are not passed to custom param definition transformer HOT 8
- `end` as a method name / prop can cause some issues HOT 4
- LICENSE file is empty HOT 1
- Typo in error message for use of alternation inside an optional
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cucumber-expressions.