MCPcopy Create free account
hub / github.com/ReadyTalk/avian / setExecutableTestWithPermissions

Method setExecutableTestWithPermissions

test/Files.java:26–42  ·  view source on GitHub ↗
(boolean executable)

Source from the content-addressed store, hash-verified

24 }
25
26 private static void setExecutableTestWithPermissions(boolean executable)
27 throws Exception
28 {
29 File file = File.createTempFile("avian.", null);
30 try {
31 file.setExecutable(executable);
32 if (executable) {
33 expect(file.canExecute());
34 } else {
35 // Commented out because this will fail on Windows - both on Avian and on OpenJDK
36 // The implementation for Windows considers canExecute() to be the same as canRead()
37 // expect(!file.canExecute());
38 }
39 } finally {
40 expect(file.delete());
41 }
42 }
43
44 public static void main(String[] args) throws Exception {
45 isAbsoluteTest(true);

Callers 1

mainMethod · 0.95

Calls 5

createTempFileMethod · 0.95
setExecutableMethod · 0.95
expectMethod · 0.95
canExecuteMethod · 0.95
deleteMethod · 0.95

Tested by

no test coverage detected