You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2017/07/23 14:34:28 UTC
commons-compress git commit: COMPRESS-417 add test
Repository: commons-compress
Updated Branches:
refs/heads/master 52cb7925a -> 8e8de29c2
COMPRESS-417 add test
Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/8e8de29c
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/8e8de29c
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/8e8de29c
Branch: refs/heads/master
Commit: 8e8de29c2b6a8f387a1a72eaaab433d9041ee26e
Parents: 52cb792
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sun Jul 23 16:33:33 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Jul 23 16:34:12 2017 +0200
----------------------------------------------------------------------
.../archivers/tar/TarArchiveInputStreamTest.java | 12 ++++++++++++
src/test/resources/COMPRESS-417.tar | Bin 0 -> 10240 bytes
2 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-compress/blob/8e8de29c/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
index e73982d..f16d584 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
@@ -337,6 +337,18 @@ public class TarArchiveInputStreamTest {
}
}
+ /**
+ * @link "https://issues.apache.org/jira/browse/COMPRESS-417"
+ */
+ @Test
+ public void skipsDevNumbersWhenEntryIsNoDevice() throws Exception {
+ try (TarArchiveInputStream is = getTestStream("/COMPRESS-417.tar")) {
+ assertEquals("test1.xml", is.getNextTarEntry().getName());
+ assertEquals("test2.xml", is.getNextTarEntry().getName());
+ assertNull(is.getNextTarEntry());
+ }
+ }
+
private TarArchiveInputStream getTestStream(final String name) {
return new TarArchiveInputStream(
TarArchiveInputStreamTest.class.getResourceAsStream(name));
http://git-wip-us.apache.org/repos/asf/commons-compress/blob/8e8de29c/src/test/resources/COMPRESS-417.tar
----------------------------------------------------------------------
diff --git a/src/test/resources/COMPRESS-417.tar b/src/test/resources/COMPRESS-417.tar
new file mode 100644
index 0000000..807683b
Binary files /dev/null and b/src/test/resources/COMPRESS-417.tar differ