swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40
Raw File
Tip revision: 8e630552924eac54c809aa7bc30871c7df1582d3 authored by Kristoffer Carlsson on 07 May 2023, 11:25:42 UTC
Set VERSION to 1.9.0 (#49622)
Tip revision: 8e63055
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