commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject commons-compress git commit: verify parsing works as expected
Date Fri, 05 Feb 2016 17:01:11 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master b67a14697 -> 9b852f382


verify parsing works as expected


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/9b852f38
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/9b852f38
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/9b852f38

Branch: refs/heads/master
Commit: 9b852f382500ba4edc778edd2bbb0d54563d4307
Parents: b67a146
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Fri Feb 5 18:00:03 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Fri Feb 5 18:00:37 2016 +0100

----------------------------------------------------------------------
 .../apache/commons/compress/archivers/tar/TarUtilsTest.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/9b852f38/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
index 9b83116..ed77194 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
@@ -358,4 +358,13 @@ public class TarUtilsTest {
         assertFalse(TarUtils.verifyCheckSum(invalid));
     }
 
+    @Test
+    public void testParseOctalCompress330() throws Exception{
+        long expected = 0100000;
+        byte [] buffer = new byte[] {
+            32, 32, 32, 32, 32, 49, 48, 48, 48, 48, 48, 32
+        };
+        assertEquals(expected, TarUtils.parseOctalOrBinary(buffer, 0, buffer.length));
+    }
+
 }


Mime
View raw message