Skip to content

Commit 60bc201

Browse files
committed
Added testcase for PLXCOMP-164
1 parent 731a332 commit 60bc201

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.codehaus.plexus.archiver.util;
2+
3+
import java.io.File;
4+
import java.util.HashMap;
5+
6+
import org.codehaus.plexus.components.io.attributes.Java7FileAttributes;
7+
import org.codehaus.plexus.logging.console.ConsoleLogger;
8+
9+
import junit.framework.TestCase;
10+
11+
public class ArchiveEntryUtilsTest extends TestCase {
12+
13+
public void testChmodForFileWithDollarPLXCOMP164() throws Exception
14+
{
15+
16+
File temp = File.createTempFile("A$A", "BB$");
17+
18+
ArchiveEntryUtils.chmod( temp, 0770, new ConsoleLogger( org.codehaus.plexus.logging.Logger.LEVEL_DEBUG, "foo" ), false);
19+
20+
Java7FileAttributes j7 = new Java7FileAttributes(temp, new HashMap<Integer, String>(), new HashMap<Integer, String>());
21+
22+
assertTrue(j7.isGroupExecutable());
23+
assertTrue(j7.isGroupReadable());
24+
assertTrue(j7.isGroupWritable());
25+
26+
assertFalse(j7.isWorldExecutable());
27+
assertFalse(j7.isWorldReadable());
28+
assertFalse(j7.isWorldWritable());
29+
30+
}
31+
}

0 commit comments

Comments
 (0)