Skip to content

Commit

Permalink
test: give all permissions when testing execution permission on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jGleitz committed Sep 30, 2020
1 parent cface9f commit 3fc64f1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,14 @@ abstract class PathAssertionsSpec(
context("ACL: executable", skip = ifAclNotSupported) {
it("does not throw for file") withAndWithoutSymlink { maybeLink ->
val file = maybeLink.create(tempFolder.newFile("executable"))
file.whileWithAcl(TestAcls::ownerExecute) {
file.whileWithAcl(TestAcls::all) {
expect(file).isExecutableFun()
}
}

it("does not throw for directory") withAndWithoutSymlink { maybeLink ->
val folder = maybeLink.create(tempFolder.newDirectory("executable"))
folder.whileWithAcl(TestAcls::ownerExecute) {
folder.whileWithAcl(TestAcls::all) {
expect(folder).isExecutableFun()
}
}
Expand Down Expand Up @@ -1106,8 +1106,8 @@ internal object TestAcls {
aclEntry(ALLOW, owner, *AclEntryPermission.values())
)

fun ownerExecute(owner: UserPrincipal) = listOf(
aclEntry(ALLOW, owner, READ_DATA, WRITE_DATA, EXECUTE)
fun all(owner: UserPrincipal) = listOf(
aclEntry(ALLOW, owner, *AclEntryPermission.values())
)

fun ownerNoExecute(owner: UserPrincipal) = listOf(
Expand Down

0 comments on commit 3fc64f1

Please sign in to comment.