Skip to content

Commit

Permalink
Merge pull request #25855 from JuliaLang/ksh/showint
Browse files Browse the repository at this point in the history
Add tests for showing Core.Intrinsics
  • Loading branch information
StefanKarpinski authored Feb 2, 2018
2 parents 90d1f1c + 37b5d92 commit 9f8496c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1146,3 +1146,13 @@ end
show(buf, methods(f22798))
@test contains(String(take!(buf)), "f22798(x::Integer, y)")
end

@testset "Intrinsic printing" begin
@test sprint(show, Core.Intrinsics.arraylen) == "arraylen"
let io = IOBuffer()
show(io, MIME"text/plain"(), Core.Intrinsics.arraylen)
str = String(take!(io))
@test contains(str, "arraylen")
@test contains(str, "(intrinsic function")
end
end

0 comments on commit 9f8496c

Please sign in to comment.