Skip to content

Commit ed89ae7

Browse files
authored
Test for Windows delete permissions in system folders (JuliaLang#39078)
1 parent 9f8bdc2 commit ed89ae7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/file.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,3 +1543,16 @@ end
15431543
chmod(dir, 0o777; recursive=true)
15441544
end
15451545
end
1546+
1547+
if Sys.iswindows()
1548+
@testset "mkdir/rm permissions" begin
1549+
# test delete permission in system folders (i.e. impliclty test chmod permissions)
1550+
# issue #38433
1551+
@test withenv("TMP" => "C:\\") do
1552+
mktempdir() do dir end
1553+
end === nothing
1554+
# same as above, but test rm explicitly
1555+
tmp = mkdir(tempname("C:\\"))
1556+
@test rm(tmp) === nothing
1557+
end
1558+
end

0 commit comments

Comments
 (0)