Revision 76c232bd4413bd0dc7fd1d17f99defe886475d81 authored by Rafael Fourquet on 07 July 2020, 16:01:51 UTC, committed by Jeff Bezanson on 25 July 2020, 16:56:54 UTC
(cherry picked from commit 109dee7ace39e044ee54ca3455120fb8b9aefe98)
1 parent 75de80b
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
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...