-
-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cucumber-expressions: Fix suggestions with in-word parameters (#661)
* Add tests describing issue #657 * Force ParameterTypeMatcher to match full words * Enable choosing it custom ParameterType must match a full word or not - default is true - default parameters do not force matching a word (to be discussed) - updated some tests so they keep passing * Take into account punctuation when suggesting parameters * Java: Don't suggest parameter unless at beginning/end or surrounded by space/punctuation Also: Remove an obsolete test, update other tests and improve float/double matching * Remove "force_full_word" parameter when creating ParameterType Also use \p{P} instead of [[:punct]] to have the same implementation across multiple languages Update tests so they still reflect expected behavior even with word matching * Port tests from cucumber-expressions/ruby to reflect issue #657 * Only propose full words as parameters in cucumber-expressions/javascript Also adapt tests so they reflect those changes * Fixed rspec organization so the test name make sense * Port tests from cucumber-expressions/ruby to cucumber-expressions/go to reflect issue #657 * Do not suggest in-word parameters in cucumber-expressions/go Also update test to reflect the changes * Apply @luke-hill review for a more ruby-ish code * Undo changes unrelated to matching words * Extract groupMatchesFullWord method for clarity
- Loading branch information
1 parent
9b51d46
commit 388003d
Showing
10 changed files
with
423 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 25 additions & 5 deletions
30
...-expressions/java/src/main/java/io/cucumber/cucumberexpressions/ParameterTypeMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.