Revision 835e148ef7b62ac09ff3f5209745796473161d60 authored by Daniel Karrasch on 24 February 2020, 11:26:07 UTC, committed by GitHub on 24 February 2020, 11:26:07 UTC
1 parent 39b431d
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 ...