You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2012/04/05 01:11:28 UTC

DO NOT REPLY [Bug 53036] New: FixCRLF does not respect the eol="asis" setting

https://issues.apache.org/bugzilla/show_bug.cgi?id=53036

             Bug #: 53036
           Summary: FixCRLF does not respect the eol="asis" setting
           Product: Ant
           Version: nightly
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: snake.scaly@gmail.com
    Classification: Unclassified


Created attachment 28545
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28545
Sample Windows project to reproduce the bug

FixCRLF task always converts line endings to platform-default even if
eol="asis" option is specified.

Steps to reproduce in Windows:

1) Create a simple Ant project for conversion, for example:

<project name="test">
        <target name="crlf">
                <fixcrlf file="test.txt"
                         destDir="out"
                         eol="asis"
                         tab="remove"
                         tablength="4"/>
        </target>
</project>

2) Create a test file, test.txt, for example:

^I^Ia$
^Ib$

where "^I" is a single TAB character and "$" is a single LF character.

3) Build the "crlf" target:

$ ant crlf


Observed result: the out/test.txt file has each TAB character replaced with 4
spaces, and each end of line represented with CRLF sequence.

Expected result: the out/test.txt file should have each TAB character replaced
with 4 spaces but EOLs should stay LF-only.


Steps to reproduce in *NIX: same, but make sure that the initial test.txt file
in step 2 uses DOS convention for line endings, for example:

$ unix2dos test.txt

After the crlf target is built, the out/test.txt will have LF line endings
while expected result is the original CRLF line endings


Attached is a sample project which can be used to reproduce the bug in Windows.


Tested build: apache-ant-1.9.0alpha nightly build #296 (Mar 19, 2012 12:02:44
AM)

Tested platforms:
1) Windows 7 Enterprise
2) Red Hat Enterprise 6.2 kernel 2.6.32-220.4.2.el6.x86_64

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 53036] FixCRLF does not respect the eol="asis" setting

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53036

J.M. (Martijn) Kruithof <jk...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |1.9.0

--- Comment #1 from J.M. (Martijn) Kruithof <jk...@apache.org> ---
Cause found, but the function is quite old.

ASIS currently is implemented to always go to the platform encoding, this has
been so since the beginning. Indeed this does not match the documentation.

as the documentation is quite explicit on how to achieve the platform encoding
(by not specifying the eol attribute, I will change the behaviour of ASIS to
indeed leave eols always alone.

fixlast will never apply in case eol behaviour is ASIS.

-- 
You are receiving this mail because:
You are the assignee for the bug.