https://github.com/JuliaLang/julia
Raw File
Tip revision: 6445c82d0060dbe82b88436f0f4371a4ee64d918 authored by Tony Kelman on 05 March 2017, 13:25:39 UTC
Tag v0.5.1
Tip revision: 6445c82
workspace.jl
# This file is a part of Julia. License is MIT: http://julialang.org/license

script = """
# Issue #11948
f(x) = x+1
workspace()
@assert !isdefined(:f)
LastMain.f(2)

# PR #12990
io = IOBuffer()
show(io, Pair)
@assert takebuf_string(io) == "Pair{A,B}"
@assert !Base.inbase(LastMain)
"""
exename = Base.julia_cmd()
run(`$exename --startup-file=no -e $script`)

# issue #17764
script2 = """
type Foo end
workspace()
type Foo end
@assert Tuple{Type{LastMain.Foo}} !== Tuple{Type{Main.Foo}}
"""
run(`$exename --startup-file=no -e $script2`)
back to top