mollusk 019f8e3064 Add: julia-0.6.2
Former-commit-id: ccc667cf67d569f3fb3df39aa57c2134755a7551
2018-02-10 10:27:19 -07:00

18 lines
573 B
Julia

# 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 let ct = current_task()
yieldto(@task yieldto(ct, Base.source_path()))
end == path
@test let ct = current_task()
yieldto(@task schedule(ct, Base.source_path()))
end == path
@test let ct = current_task(), t = @task Base.source_path()
schedule(ct)
yieldto(t)
wait(t)
end == path
@test isabspath(@__FILE__)