https://github.com/JuliaLang/julia
Raw File
Tip revision: ba87aa39624e58995e8045555f5d5186f601b283 authored by Alex Arslan on 31 December 2018, 23:36:59 UTC
Set VERSION to 1.1.0-rc1 (#30322)
Tip revision: ba87aa3
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