[
https://issues.apache.org/jira/browse/PIG-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Cheolsoo Park updated PIG-2998:
-------------------------------
Attachment: PIG-2998.patch
Attached is a patch that fixes the failing test.
I changed replaceAll() as follows:
{code}
val = val.replaceAll("(?<!\\\\)\\$", "\\\\\\$");
{code}
So only $ signs that are not already escaped get escaped now.
Testing done:
ant test-commit
ant test -Dtestcase=TestScriptLanange
ant test -Dtestcase=TestParamSubPreproc
Thanks!
> Fix TestScriptLangunage
> -----------------------
>
> Key: PIG-2998
> URL: https://issues.apache.org/jira/browse/PIG-2998
> Project: Pig
> Issue Type: Sub-task
> Reporter: Cheolsoo Park
> Assignee: Cheolsoo Park
> Fix For: 0.11
>
> Attachments: PIG-2998.patch
>
>
> This is a regression from PIG-2931.
> I made changes so that $ signs in a replacement string get escaped by
> PreprocessorContext. But they shouldn't be escaped if they're already escaped.
> In particular, TestScriptLanguage#bindLocalVariableTest2 is failing in trunk
> because $ signs are escaped by Pig#bind() and then escaped again by
> PreprocessorContext.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira