Skip to content
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

Improve Regex parameter's usability #152

Open
dakusui opened this issue Jul 26, 2020 · 0 comments
Open

Improve Regex parameter's usability #152

dakusui opened this issue Jul 26, 2020 · 0 comments
Assignees
Milestone

Comments

@dakusui
Copy link
Owner

dakusui commented Jul 26, 2020

Right now, users need to specify up to how many times a pattern should be repeated explicitly.

  @ParameterSource
  public Regex.Factory<String> scenario() {
    return Regex.Factory.of("open deposit(deposit|withdraw|transfer){0,2}getBalance");
  }

However, a syntax sugar such as + and * are useful and intuitive.

  @ParameterSource
  public Regex.Factory<String> scenario() {
    return Regex.Factory.of("open deposit(deposit|withdraw|transfer)+ getBalance");
  }
  • ? will be translated to {0,1}
  • + will be translated to {1,2}
  • * will be translated to {0,2}
@dakusui dakusui self-assigned this Jul 26, 2020
@dakusui dakusui added this to the 0.10.0 milestone Jul 26, 2020
@dakusui dakusui added this to To do in JCUnit 0.10.0 Jul 26, 2020
@dakusui dakusui moved this from To do to Done in JCUnit 0.10.0 Jan 28, 2022
@dakusui dakusui moved this from Done to To do in JCUnit 0.10.0 Feb 5, 2022
@dakusui dakusui moved this from To do to In progress in JCUnit 0.10.0 Feb 21, 2022
@dakusui dakusui moved this from In progress to To do in JCUnit 0.10.0 Feb 21, 2022
@dakusui dakusui modified the milestones: 0.10.0, 0.10.x Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
JCUnit 0.10.0
  
To do
Development

No branches or pull requests

1 participant