Author: bodewig
Date: Fri Jan 17 11:45:44 2014
New Revision: 1559079
URL: http://svn.apache.org/r1559079
Log:
fix test problem when working copy is in a directory with a long name so the
absolute path of the file exceeds 100 bytes - reported by Benedikt Ritter
Modified:
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
Modified:
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java?rev=1559079&r1=1559078&r2=1559079&view=diff
==============================================================================
---
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
(original)
+++
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
Fri Jan 17 11:45:44 2014
@@ -45,7 +45,7 @@ public class TarArchiveOutputStreamTest
.createArchiveOutputStream(ArchiveStreamFactory.TAR, fos);
File file1 = getFile("test1.xml");
- TarArchiveEntry sEntry = new TarArchiveEntry(file1);
+ TarArchiveEntry sEntry = new TarArchiveEntry(file1, file1.getName());
tarOut.putArchiveEntry(sEntry);
FileInputStream in = new FileInputStream(file1);
@@ -559,14 +559,14 @@ public class TarArchiveOutputStreamTest
FileOutputStream fos = new FileOutputStream(f);
TarArchiveOutputStream tos = new TarArchiveOutputStream(fos);
File file1 = getFile("test1.xml");
- TarArchiveEntry sEntry = new TarArchiveEntry(file1);
+ TarArchiveEntry sEntry = new TarArchiveEntry(file1, file1.getName());
tos.putArchiveEntry(sEntry);
FileInputStream in = new FileInputStream(file1);
IOUtils.copy(in, tos);
in.close();
tos.closeArchiveEntry();
tos.close();
- // test1.xml is small enough to fit into the default blockv size
+ // test1.xml is small enough to fit into the default block size
assertEquals(TarConstants.DEFAULT_BLKSIZE, f.length());
}