https://github.com/JuliaLang/julia
Raw File
Tip revision: b06a24a7eed4464e50f4ee594c3a303ad543c42b authored by Dilum Aluthge on 02 October 2022, 20:30:28 UTC
[`release-1.7` branch] CI (Buildkite): remove the `.buildkite` folder (#44378)
Tip revision: b06a24a
test_sourcepath.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

# source path in tasks
path = Base.source_path()::String # this variable is leaked to the source script
@test endswith(path, joinpath("test", "test_sourcepath.jl"))
@test isabspath(path)

@test let ct = current_task()
    yieldto(@task yieldto(ct, Base.source_path()))
end === ""

@test let ct = current_task()
    yieldto(@task schedule(ct, Base.source_path()))
end === ""

@test let ct = current_task(),
    t = @task Base.source_path()
    schedule(ct)
    yieldto(t)
    fetch(t)
end === ""

@test @__FILE__() == path
back to top