Skip to content

Commit

Permalink
test REPL construction of Expr objects containing IR nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed Jun 13, 2018
1 parent d5b6d46 commit 27981e0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions stdlib/REPL/test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -961,3 +961,19 @@ for (line, expr) in Pair[
buf = IOBuffer()
@test Base.eval(REPL._helpmode(buf, line)) isa Union{Markdown.MD,Nothing}
end

# PR #27562
fake_repl() do stdin_write, stdout_read, repl
repltask = @async begin
REPL.run_repl(repl)
end
write(stdin_write, "Expr(:call, GlobalRef(Base.Math, :float), Core.SlotNumber(1))\n")
readline(stdout_read)
@test readline(stdout_read) == "\e[0m:((Base.Math.float)(_1))"
write(stdin_write, "ans\n")
readline(stdout_read)
readline(stdout_read)
@test readline(stdout_read) == "\e[0m:((Base.Math.float)(_1))"
write(stdin_write, '\x04')
Base._wait(repltask)
end

0 comments on commit 27981e0

Please sign in to comment.