ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs BUnzip2Test.java BZip2Test.java
Date Thu, 29 Nov 2001 16:51:24 GMT
umagesh     01/11/29 08:51:24

  Modified:    src/etc/testcases/taskdefs bunzip2.xml bzip2.xml
               src/main/org/apache/tools/bzip2 CBZip2InputStream.java
                        CBZip2OutputStream.java
               src/testcases/org/apache/tools/ant/taskdefs BUnzip2Test.java
                        BZip2Test.java
  Log:
  Make BZip2 task comply with native bzip2 when there are multiple blocks
  in the compressed file.
  
  Submitted by Keiron Liddle "keiron@aftexsw.com"
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-ant/src/etc/testcases/taskdefs/bunzip2.xml
  
  Index: bunzip2.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/bunzip2.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bunzip2.xml	2001/11/19 15:53:14	1.1
  +++ bunzip2.xml	2001/11/29 16:51:23	1.2
  @@ -3,11 +3,11 @@
   <project basedir="." default="cleanup">
   
     <target name="realTest">
  -    <bunzip2 src="expected/asf-logo.gif.bz2" dest="asf-logo.gif" />
  +    <bunzip2 src="expected/asf-logo-huge.tar.bz2" dest="asf-logo-huge.tar" />
     </target>
   
     <target name="cleanup">
  -    <delete file="asf-logo.gif" />
  +    <delete file="asf-logo-huge.tar" />
     </target>
   
   </project>
  
  
  
  1.2       +2 -2      jakarta-ant/src/etc/testcases/taskdefs/bzip2.xml
  
  Index: bzip2.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/bzip2.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bzip2.xml	2001/11/19 15:53:14	1.1
  +++ bzip2.xml	2001/11/29 16:51:23	1.2
  @@ -3,11 +3,11 @@
   <project basedir="." default="cleanup">
   
     <target name="realTest">
  -    <bzip2 src="../asf-logo.gif" zipfile="asf-logo.gif.bz2" />
  +    <bzip2 src="expected/asf-logo-huge.tar" zipfile="asf-logo-huge.tar.bz2" />
     </target>
   
     <target name="cleanup">
  -    <delete file="asf-logo.gif.bz2" />
  +    <delete file="asf-logo-huge.tar.bz2" />
     </target>
   
   </project>
  
  
  
  1.2       +1 -1      jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
  
  Index: CBZip2InputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2InputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CBZip2InputStream.java	2001/11/16 09:49:18	1.1
  +++ CBZip2InputStream.java	2001/11/29 16:51:23	1.2
  @@ -268,7 +268,7 @@
               crcError();
   
           computedCombinedCRC = (computedCombinedCRC << 1)
  -            | (computedCombinedCRC >> 31);
  +            | (computedCombinedCRC >>> 31);
           computedCombinedCRC ^= computedBlockCRC;
       }
   
  
  
  
  1.2       +1 -1      jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
  
  Index: CBZip2OutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CBZip2OutputStream.java	2001/11/16 09:49:19	1.1
  +++ CBZip2OutputStream.java	2001/11/29 16:51:23	1.2
  @@ -454,7 +454,7 @@
   
       private void endBlock() throws IOException {
           blockCRC = mCrc.getFinalCRC();
  -        combinedCRC = (combinedCRC << 1) | (combinedCRC >> 31);
  +        combinedCRC = (combinedCRC << 1)|(combinedCRC >>> 31);
           combinedCRC ^= blockCRC;
   
           /* sort the block and establish posn of original string */
  
  
  
  1.2       +4 -4      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/BUnzip2Test.java
  
  Index: BUnzip2Test.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/BUnzip2Test.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BUnzip2Test.java	2001/11/19 15:53:14	1.1
  +++ BUnzip2Test.java	2001/11/29 16:51:24	1.2
  @@ -61,7 +61,7 @@
   
   /**
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class BUnzip2Test extends BuildFileTest {
   
  @@ -69,7 +69,7 @@
           super(name);
       }
   
  -    public void setUp() { 
  +    public void setUp() {
           configureProject("src/etc/testcases/taskdefs/bunzip2.xml");
       }
   
  @@ -80,7 +80,7 @@
       public void testRealTest() throws java.io.IOException {
           FileUtils fileUtils = FileUtils.newFileUtils();
           executeTarget("realTest");
  -        assertTrue(fileUtils.contentEquals(project.resolveFile("../asf-logo.gif"),
  -                                           project.resolveFile("asf-logo.gif")));
  +        assertTrue(fileUtils.contentEquals(project.resolveFile("expected/asf-logo-huge.tar"),
  +                                           project.resolveFile("asf-logo-huge.tar")));
       }
   }
  
  
  
  1.2       +4 -4      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/BZip2Test.java
  
  Index: BZip2Test.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/BZip2Test.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BZip2Test.java	2001/11/19 15:53:14	1.1
  +++ BZip2Test.java	2001/11/29 16:51:24	1.2
  @@ -61,7 +61,7 @@
   
   /**
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class BZip2Test extends BuildFileTest {
   
  @@ -69,7 +69,7 @@
           super(name);
       }
   
  -    public void setUp() { 
  +    public void setUp() {
           configureProject("src/etc/testcases/taskdefs/bzip2.xml");
       }
   
  @@ -80,7 +80,7 @@
       public void testRealTest() throws java.io.IOException {
           FileUtils fileUtils = FileUtils.newFileUtils();
           executeTarget("realTest");
  -        assertTrue(fileUtils.contentEquals(project.resolveFile("expected/asf-logo.gif.bz2"),
  -                                           project.resolveFile("asf-logo.gif.bz2")));
  +        assertTrue(fileUtils.contentEquals(project.resolveFile("expected/asf-logo-huge.tar.bz2"),
  +                                           project.resolveFile("asf-logo-huge.tar.bz2")));
       }
   }
  
  
  

--
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