How to concat a single quote with citrus:concat?
Citrus Version 2.7.1
Question How to concat a single quote with citrus:concat?
What I've tried so far
<create-variables>
<variable name="sql" value="citrus:concat( 'select from xx where id='', ''' )"/>
</create-variables>
The second value with a single quote isn't concated to the first string. How can I do this?
Additional information
Hi!
I've investigated the issue. Currently this is a bug unfortunately. There is a pretty ugly workaround to make the single quote concatenation work use ''''' instead of '''.
So you could fix your test with the provided hotfix but I'll definitely change this logic in future releases. Do you have many test cases where this issue occurs?
BR, Sven
Developer note:
The issue occurs in the class FunctionParameterHelper, because the method cutOffSingleQuotes is called twice.
Hi Sven the workaround is working. I will change it and hope for a fix in the future
Hi!
There will be a fix for sure. I just can't provide a timeline. :wink:
BR, Sven