[ 
https://issues.apache.org/jira/browse/FREEMARKER-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952311#comment-14952311
 ] 

Woonsan Ko commented on FREEMARKER-3:
-------------------------------------

The reason why freemarker.core.ASTTest fails on OS X (or other *NIX systems 
maybe) is because the generated .ast representation may contain new line 
literal in content like the following example:
{noformat}
    #text  // f.c.TextBlock
        - content: "\r\n"  // String
    ${...}  // f.c.DollarVariable
{noformat}

Meanwhile, the expectation .ast file (such as 
src/test/resources/freemarker/core/ast-range.ast) is written like this:
{noformat}
    #text  // f.c.TextBlock
        - content: "\n"  // String
    ${...}  // f.c.DollarVariable
{noformat}

Therefore, I think we can fix this by replacing the newline literals as well as 
newline chars in the test case.

> FileTemplateLoaderTest and ASTTest fails test on non-Windows env
> ----------------------------------------------------------------
>
>                 Key: FREEMARKER-3
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-3
>             Project: Apache Freemarker
>          Issue Type: Bug
>         Environment: - OS X 10.10.5 x86_64
> - Apache Ant(TM) version 1.9.6 compiled on June 29 2015
> - Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
>            Reporter: Woonsan Ko
>
> From master, if you run `ant test' on OS X (Ant 1.9 / Java 1.8), two tests 
> fail:
> {noformat}
>     [junit] TEST freemarker.cache.FileTemplateLoaderTest FAILED
>     [junit] TEST freemarker.core.ASTTest FAILED
> {noformat}
> Those look like an environment related issue. FileTemplateLoaderTest seems 
> failing when resolving file in case-sensitive way and ASTTest seems failing 
> due to EOL issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to