You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/06/13 09:48:08 UTC
svn commit: r784346 -
/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java
Author: mturk
Date: Sat Jun 13 07:48:08 2009
New Revision: 784346
URL: http://svn.apache.org/viewvc?rev=784346&view=rev
Log:
Add setFileAttributes test
Modified:
commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java
Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java?rev=784346&r1=784345&r2=784346&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestFile.java Sat Jun 13 07:48:08 2009
@@ -215,5 +215,18 @@
f.delete();
}
+ public void testSetAttributes()
+ throws Exception
+ {
+ File f = new File("ffoo");
+ f.createNewFile();
+ EnumSet <FileProtection> fp = f.getFileProtection();
+ System.out.println("Org Attr Protection " + fp);
+ f.setFileAttributes(EnumSet.of(FileAttributes.READ), EnumSet.allOf(FileAttributes.class));
+ EnumSet <FileProtection> np = f.getFileProtection();
+ System.out.println("Set Attr Protection " + np);
+ assertFalse("GWRITE", np.contains(FileProtection.GWRITE));
+ f.delete();
+ }
}