Very simple test:

Standard junit test in standard grails groovy project:

@Test public void pipeTest(){
        println 'RIM-T | TSX | Communications & Media'
}

Output:
RIM-TÂ |Â TSXÂ |Â Communications & Media

Gradle hides standard out and drops it into the junit xml where you'll find

<system-out><![CDATA[RIM-TÂ |Â TSXÂ |Â Communications & Media
]]></system-out>


I am not insane!






On Wed, Jun 8, 2011 at 4:05 PM, Kallin Nagelberg <[email protected]
> wrote:

> I have discovered that it is the presence of pipes in the String that
> causes these problems. Known gradle issue?
>
>
>
> On Wed, Jun 8, 2011 at 1:49 PM, Kallin Nagelberg <
> [email protected]> wrote:
>
>> I have a unit test that is using xmlslurper to analyse some html. When I
>> run this in my IDE it is fine, but in gradle strange characters arise.
>>
>> The code is something like:
>>
>> GPathResult root = new XmlSlurper(parser).parseText(stockSummaryText)
>>         def summary = root.depthFirst().find {
>>             it.@'class'.toString() == 'summary'
>>         }
>>
>> def securityName = summary.H2.toString()
>> println securityName
>>
>>
>> in the IDE it prints
>>
>> RIM-T | TSX | Communications & Media
>>
>> when run in gradle it prints:
>>
>> RIM-Tá|áTSXá|áCommunications & Media
>>
>>
>> Anyone have an idea where these would be coming from?
>>
>>
>> Thanks,
>> -Kal
>>
>>
>>
>

Reply via email to