You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/06/01 18:58:22 UTC
svn commit: r950163 -
/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
Author: sebb
Date: Tue Jun 1 16:58:22 2010
New Revision: 950163
URL: http://svn.apache.org/viewvc?rev=950163&view=rev
Log:
Must have trailing space/NUL
Modified:
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java?rev=950163&r1=950162&r2=950163&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java (original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java Tue Jun 1 16:58:22 2010
@@ -50,7 +50,13 @@ public class TarUtilsTest extends TestCa
buffer[buffer.length-1]=0;
value = TarUtils.parseOctal(buffer,0, buffer.length);
assertEquals(MAX_OCTAL, value);
- buffer = "abcdef".getBytes("UTF-8"); // Invalid input
+ buffer = "abcdef ".getBytes("UTF-8"); // Invalid input
+ try {
+ TarUtils.parseOctal(buffer,0, buffer.length);
+ fail("Expected IllegalArgumentException");
+ } catch (IllegalArgumentException expected) {
+ }
+ buffer = "77777777777".getBytes("UTF-8"); // Invalid input
try {
TarUtils.parseOctal(buffer,0, buffer.length);
fail("Expected IllegalArgumentException");