Skip to content

Commit

Permalink
Test for Windows delete permissions in system folders (#39078)
Browse files Browse the repository at this point in the history
  • Loading branch information
musm committed Jan 6, 2021
1 parent 9f8bdc2 commit ed89ae7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1543,3 +1543,16 @@ end
chmod(dir, 0o777; recursive=true)
end
end

if Sys.iswindows()
@testset "mkdir/rm permissions" begin
# test delete permission in system folders (i.e. impliclty test chmod permissions)
# issue #38433
@test withenv("TMP" => "C:\\") do
mktempdir() do dir end
end === nothing
# same as above, but test rm explicitly
tmp = mkdir(tempname("C:\\"))
@test rm(tmp) === nothing
end
end

0 comments on commit ed89ae7

Please sign in to comment.