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

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

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

savkk
Copy link
Member

@savkk savkk commented Sep 6, 2018

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.
@@ -40,7 +40,7 @@ public ExpressionExamplesTest(String expressionString, String text, String expec
String[] chunks = s.split("---");
for (String chunk : chunks) {
chunk = chunk.trim();
data.add(chunk.split("\n"));
data.add(chunk.split(System.lineSeparator()));
Copy link
Contributor

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
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
Member 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
Member 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
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
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
Copy link
Contributor

lsuski commented Oct 8, 2018

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

@lsuski
Copy link
Contributor

lsuski commented Oct 8, 2018

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
Copy link

lock bot commented Oct 8, 2019

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