Revision 21207b7e35fd84817aaf3b40959dd1571329e2f7 authored by kshyatt on 25 February 2017, 00:36:55 UTC, committed by kshyatt on 25 February 2017, 00:36:55 UTC
1 parent 86b56c3
Raw File
test_sourcepath.jl
# This file is a part of Julia. License is MIT: http://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__)
back to top