Skip to content

Commit

Permalink
unit test for issue 55340
Browse files Browse the repository at this point in the history
  • Loading branch information
fatteneder committed Aug 2, 2024
1 parent e8466e9 commit fb19c5c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/relocatedepot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,28 @@ if !test_relocated_depot
if isdirpath(DEPOT_PATH[1])
DEPOT_PATH[1] = dirname(DEPOT_PATH[1]) # strip trailing pathsep
end
tag = joinpath("@depot", "") # append a pathsep
tag = string("@depot", Base.Filesystem.pathsep())
@test startswith(Base.replace_depot_path(path), tag)
DEPOT_PATH[1] = joinpath(DEPOT_PATH[1], "") # append a pathsep
DEPOT_PATH[1] = string(DEPOT_PATH[1], Base.Filesystem.pathsep())
@test startswith(Base.replace_depot_path(path), tag)
popfirst!(DEPOT_PATH)
@test !startswith(Base.replace_depot_path(path), tag)
end
end

# 55340
test_harness(empty_depot_path=true) do
mktempdir() do dir
jlrc = joinpath(dir, "julia-rc2")
jl = joinpath(dir, "julia")
mkdir(jlrc)
push!(DEPOT_PATH, jlrc)
@test Base.replace_depot_path(jlrc) == "@depot"
@test Base.replace_depot_path(jl) != "@depot-extended"
@test Base.replace_depot_path(jl) == jl
end
end

end

@testset "restore path from @depot tag" begin
Expand Down

0 comments on commit fb19c5c

Please sign in to comment.