Skip to content

Instantly share code, notes, and snippets.

@fonsp
Last active July 3, 2020 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonsp/412a827cdc4153e73155260129a176f1 to your computer and use it in GitHub Desktop.
Save fonsp/412a827cdc4153e73155260129a176f1 to your computer and use it in GitHub Desktop.
using Test
"asdf"
function jl_is_runnable(path)
🏡 = Core.eval(Main, :(module asdf end))
try
Core.eval(🏡, :(include($path)))
catch ex
println.(enumerate(readlines(path; keep=true)))
showerror(stderr, ex, stacktrace(catch_backtrace()))
end
end
@test jl_is_runnable("./worse.jl")
@assert z == 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment