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

add support for matchesRegex placeholder #178

Merged
merged 1 commit into from May 6, 2020

Conversation

Jazzyekim
Copy link

Introduce the implementation of matchesRegex placeholders. Need that functionality on the project I am working on. I decided to share my implementation with you as a PR
Since this placeholder contains a parameter I had to extend the signature of evaluate method to support parameters as optional array of strings.

@coveralls
Copy link

coveralls commented Mar 24, 2020

Coverage Status

Coverage increased (+0.04%) to 91.808% when pulling fea1758 on Jazzyekim:placeholder-regex into 4866621 on xmlunit:master.

@bodewig
Copy link
Member

bodewig commented Apr 20, 2020

Many thanks @Jazzyekim this looks interesting. It may also help #174 in a way.

Actually when I looked at your code first I wanted to see whether we could get away without breaking the interface with the help of default methods - even if that meant to move on to Java 8 for the placeholders project. Unfortunately I haven't found the time to try this out, yet.

@bodewig bodewig added this to the 2.6.5 milestone May 4, 2020
@bodewig bodewig merged commit ee476a2 into xmlunit:master May 6, 2020
bodewig added a commit that referenced this pull request May 6, 2020
the module has been marked as experimental so making backwards
incompatible changes should be fine, but still we should at least do a
minor release for this.

see #178
bodewig added a commit that referenced this pull request May 6, 2020
@bodewig
Copy link
Member

bodewig commented May 6, 2020

@Jazzyekim many thanks

I've rewritten PlaceholderDifferenceEvaluators argument list parsing a bit in order to make it more configurable in 22b014a - at least the existing tests still pass, except I had to change the one about the bad regex as the changed code would use the second parenthesis as opening the argument list and not cause any problem because the keyword then wouldn't match.

@Jazzyekim
Copy link
Author

@bodewig, glad to hear that you found it useful! Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants