Skip to content

Commit

Permalink
Test to conform with limit to storing err
Browse files Browse the repository at this point in the history
  • Loading branch information
BioTurboNick committed Jun 10, 2021
1 parent 94f3208 commit ef18cf1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stdlib/REPL/test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ end
end
end

# err should reprint error
# err should reprint error if deeper than top-level
fake_repl() do stdin_write, stdout_read, repl
repltask = @async begin
REPL.run_repl(repl)
Expand All @@ -1374,6 +1374,11 @@ fake_repl() do stdin_write, stdout_read, repl
readuntil(stdout_read, "julia> ", keep=true)
write(stdin_write, "err\n")
readline(stdout_read)
@test readline(stdout_read) == "\e[0mERROR: UndefVarError: err not defined"
readuntil(stdout_read, "julia> ", keep=true)
write(stdin_write, "foo() = foobar\n")
write(stdin_write, "foo()\n")
readline(stdout_read)
@test readline(stdout_read) == "\e[0m1-element ExceptionStack:"
@test readline(stdout_read) == "ERROR: UndefVarError: foobar not defined"
@test readline(stdout_read) == "Stacktrace:"
Expand Down

0 comments on commit ef18cf1

Please sign in to comment.