Hi,


According to our discussion, I created the
http://jira.codehaus.org/browse/JBEHAVE-1062 issue.



I hope the issue has all necessary information. I was confused a little bit
about the affected and fix version, so please review that.



I am also looking forward for more contribution, but I am a beginner in
contribution for open source projects, so will take some time to warm-up.



Regards,

rSzabi



*From:* Mauro Talevi [mailto:mauro.tal...@aquilonia.org
<mauro.tal...@aquilonia.org>]
*Sent:* Wednesday, December 17, 2014 2:19 PM
*To:* user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Excamples table and named parameter values
with backslash character



Hi

I don't see any problem with the proposed solution.

Can you please contribute it following:
http://jbehave.org/how-to-contribute.html

Cheers

On 17/12/2014 08:45, RUGINA Szabolcs-Gavril wrote:

Hi guys,



I have a situation where I need to use in an examples table values
containing backslash characters.

Because somehow the backslash(es) are disappearing from the textual data
what arrives to logic, I made a debug and checked the user mailing list.



Indeed first of all I need the backslashes for simulating newline
character, as other user asked,

but I didn’t found any entry regarding the \ and $ characters as that would
solve my problem.



During the debug I found, that the main cause is the
String.replaceAll(regex, replacement) at
ExamplesTable#replaceNamedParameters(Map<String,
String> row)

used at line 339 at version 3.9.3 as:



replacedValue = replacedValue.replaceAll(namedKey, namedValue);



I don’t know, how widely is used the regex advanced functionality
(grouping) when declaring named parameters and they values (with or without
examples table),

but if is not,  changing the above line to



replacedValue = replacedValue.replaceAll(namedKey, java.util.regex.Matcher.
*quoteReplacement*(namedValue));



would help some people.



Thanks in advance for your comments.



Best Regards,



Szabolcs Rugina

Java Developer






-- 
Rugina Szabolcs
ruginaszabo...@gmail.com
Mobile: 0771483274
Fax: 0378105445

Reply via email to