DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476 copy with filtering modifies lineendings ------- Additional Comments From [EMAIL PROTECTED] 2003-04-16 00:26 ------- Ok, got the unit test and patches to current tests id 5850: This contains patches against the following files: src/etc/testcases/filters/build.xml add test target for no end of line adding for copy/filterchain src/etc/testcases/filters/input/stripjavacomments.test add nl to end of this file so that it matches expected output (magic of cvs will pick the correct nl form for the platform) src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java add nl to end of this file so that it matches expected output src/main/org/apache/tools/ant/util/FileUtils.java reissue of patch id 5851: The unit test for checking if the copy/filterchain does not add a new line (it uses testNoAddNewLine target in build.xml) Without the change to fileutils all the enabled tests pass except nonewlinetest With the change all the enabled tests pass I have not been able to fix the head/tail unit tests. However I have a number of observations (testing under linux, after patch) 1) the number of lines for tail is incorrect if the file ends in a new-line input: "line 1\nline 2\nline 3\n" tail l=2 -> just gives "line3\n" input: "line 1\nline 2\nline 3" tail l=2 -> gives "line 2\nline 3" 2) the skip attribute does not work for linux for tail input: "line 1\nline 2\nline 3\n" tail l=-1 s=1 -> gives "line 1\nline 2\nline " input: "line 1\nline 2\nline 3" tail l=-1 s=1 -> gives "line 1\nline " 3) the filter does not deal with mac files (the code only looks for \n). Peter