Skip to content

cucumber-expressions: {word}-expression with unicode fix - #471

Merged
aslakhellesoy merged 1 commit into
cucumber:masterfrom
savkk:bugfix/word-expr-with-unicode
Sep 13, 2018
Merged

aslakhellesoy merged 1 commit into
cucumber:masterfrom
savkk:bugfix/word-expr-with-unicode

Conversation

@savkk

@savkk savkk commented Sep 6, 2018

Copy link
Copy Markdown
Contributor

Summary

  • fix {word}-expression using Unicode characters.
  • fix line separator in ExpressionExamplesTest.

Details

I think the summary is detailed enough :)

Motivation and Context

I have a problem when using {word}-expression with russian words.

How Has This Been Tested?

I've written unit-tests. An I'm testing it in my bdd-project.

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • [ x] I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

…ICODE_CHARACTER_CLASS flag soles this problem.
for (String chunk : chunks) {
chunk = chunk.trim();
data.add(chunk.split("\n"));
data.add(chunk.split(System.lineSeparator()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ensure the examples.txt file has unix line endings and this shouldn't be needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - I’ll merge this when the other implementations have a similar fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpkorstanje, I use Windows as default OS. And I've faced a problem when tried to run tests that were in your repo. I think Files.readAllBytes(Path p) adds line separator depending on the OS that it's executed on.
So I can't use unix line endings if I use Windows. I guess, it won't be convenient for other users too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aslakhellesoy, I don't really understand what exactly do you mean by "other implementations".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaScript, Go and Ruby

@aslakhellesoy

Copy link
Copy Markdown
Contributor

Hi @savkk,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@lsuski

lsuski commented Oct 8, 2018

Copy link
Copy Markdown
Contributor

This broke cucumber on Android because of java.lang.IllegalArgumentException: Unsupported flags: 256. I'll check if can find workaround for this

@lsuski

lsuski commented Oct 8, 2018

Copy link
Copy Markdown
Contributor

Although this flag exists in Android and docs says that it has no effect on Android but can be passed it is omitted in source code and passing it throws exception.

@lock

lock Bot commented Oct 8, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants