ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs FixCrLfTest.java
Date Tue, 03 Sep 2002 15:51:53 GMT
bodewig     2002/09/03 08:51:53

  Modified:    src/etc/testcases/taskdefs/fixcrlf build.xml
               src/testcases/org/apache/tools/ant/taskdefs FixCrLfTest.java
  Added:       src/etc/testcases/taskdefs/fixcrlf/expected crcrlf.dos
                        crcrlf.mac crcrlf.unix
               src/etc/testcases/taskdefs/fixcrlf/input crcrlf
  Log:
  Add explicit tests for <fixcrlf>'s CRCRLF handling.
  
  PR: 12219
  
  Revision  Changes    Path
  1.8       +21 -0     jakarta-ant/src/etc/testcases/taskdefs/fixcrlf/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/fixcrlf/build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml	1 Jun 2002 12:26:37 -0000	1.7
  +++ build.xml	3 Sep 2002 15:51:52 -0000	1.8
  @@ -121,4 +121,25 @@
                />
     </target>
   
  +  <target name="testCrCrLfSequence-unix" depends="init">
  +    <fixcrlf srcdir="input" destdir="result"
  +             includes="crcrlf"
  +             eol="lf"
  +             />
  +  </target>
  +
  +  <target name="testCrCrLfSequence-dos" depends="init">
  +    <fixcrlf srcdir="input" destdir="result"
  +             includes="crcrlf"
  +             eol="crlf"
  +             />
  +  </target>
  +
  +  <target name="testCrCrLfSequence-mac" depends="init">
  +    <fixcrlf srcdir="input" destdir="result"
  +             includes="crcrlf"
  +             eol="cr"
  +             />
  +  </target>
  +
   </project>
  
  
  
  1.1                  jakarta-ant/src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.dos
  
  Index: crcrlf.dos
  ===================================================================
  1
  2
  
  
  
  1.1                  jakarta-ant/src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.mac
  
  Index: crcrlf.mac
  ===================================================================
  1
2
  
  
  1.1                  jakarta-ant/src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.unix
  
  Index: crcrlf.unix
  ===================================================================
  1
  2
  
  
  
  1.1                  jakarta-ant/src/etc/testcases/taskdefs/fixcrlf/input/crcrlf
  
  Index: crcrlf
  ===================================================================
  1

  2
  
  
  
  1.11      +18 -0     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java
  
  Index: FixCrLfTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FixCrLfTest.java	23 Apr 2002 10:30:12 -0000	1.10
  +++ FixCrLfTest.java	3 Sep 2002 15:51:53 -0000	1.11
  @@ -184,6 +184,24 @@
                              new File("src/etc/testcases/taskdefs/fixcrlf/result/longlines.crlf"));
       }
       
  +    public void testCrCrLfSequenceUnix() throws IOException {
  +        executeTarget("testCrCrLfSequence-unix");
  +        assertEqualContent(new File("src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.unix"),
  +                           new File("src/etc/testcases/taskdefs/fixcrlf/result/crcrlf"));
  +    }
  +
  +    public void testCrCrLfSequenceDos() throws IOException {
  +        executeTarget("testCrCrLfSequence-dos");
  +        assertEqualContent(new File("src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.dos"),
  +                           new File("src/etc/testcases/taskdefs/fixcrlf/result/crcrlf"));
  +    }
  +
  +    public void testCrCrLfSequenceMac() throws IOException {
  +        executeTarget("testCrCrLfSequence-mac");
  +        assertEqualContent(new File("src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.mac"),
  +                           new File("src/etc/testcases/taskdefs/fixcrlf/result/crcrlf"));
  +    }
  +
       public void assertEqualContent(File expect, File result) 
           throws AssertionFailedError, IOException {
           if (!result.exists()) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message