Details
Description
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change JBEHAVE-957 which added support for unicode characters.
Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to
[\p{L}\p{N}]
.
To restrict parameter names to letters only, use
[\p{L}]
.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 3.9.1 [ 19830 ] | |
Assignee | Mauro Talevi [ maurotalevi ] | |
Issue Type | Bug [ 1 ] | Improvement [ 4 ] |
Summary | @Given not parsed when parameter ends with digit | Allow step pattern parameter placeholder name to contain digits |
Mauro Talevi
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Mauro Talevi
made changes -
Description |
Upgrading from 3.8 to 3.9 broke some of our stories.
If I run the following destilled.story: Scenario: s1 Given given1 param Scenario: s2 Given given2 param With the following steps class: public class DestilledSteps { @Given("given1 $param") public void given1(String param) { System.out.printf("--given1(%s)--%n", param); } @Given("given2 $paramWithNumberAtEnd1") public void given2(String param) { System.out.printf("--given2(%s)--%n", param); } } I get the following output: Scenario: s1 --given1(param)-- Given given1 param Scenario: s2 Given given2 param (PENDING) @Given("given2 param") @Pending public void givenGiven2Param() { // PENDING } what feels like a bug to me. The first scenario works as expected, while the second has a pending step. With 3.8 one could use parameters like "$1". Workaround: use parameters without digits. |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to [\p{L}\p{N}]. To restrict parameter names to letters only, use [\p{L}] |
Summary | Allow step pattern parameter placeholder name to contain digits | Allow step pattern parameter names to use a configurable character class |
Mauro Talevi
made changes -
Description |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to [\p{L}\p{N}]. To restrict parameter names to letters only, use [\p{L}] |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to [\p{L}\p{N}]. To restrict parameter names to letters only, use [\p{L}]. |
Mauro Talevi
made changes -
Description |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to [\p{L}\p{N}]. To restrict parameter names to letters only, use [\p{L}]. |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to <pre>[\p{L}\p{N}]</pre>. To restrict parameter names to letters only, use <pre>[\p{L}]</pre>. |
Mauro Talevi
made changes -
Description |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to <pre>[\p{L}\p{N}]</pre>. To restrict parameter names to letters only, use <pre>[\p{L}]</pre>. |
Upgrading from 3.8 to 3.9 you may have found that the parameter names could not contain digits.
This was due to a change Support for digits has now been restored and in addition the character class used to find parameter names has been made configurable, defaulting to {code:java}[\p{L}\p{N}]{code}. To restrict parameter names to letters only, use {code:java}[\p{L}]{code}. |
Mauro Talevi
made changes -
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |