Skip to content

Commit fa6f288

Browse files
authored
Test to conform with limit to storing err
1 parent 08d1c75 commit fa6f288

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/REPL/test/repl.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ end
13621362
end
13631363
end
13641364

1365-
# err should reprint error
1365+
# err should reprint error if deeper than top-level
13661366
fake_repl() do stdin_write, stdout_read, repl
13671367
repltask = @async begin
13681368
REPL.run_repl(repl)
@@ -1374,6 +1374,11 @@ fake_repl() do stdin_write, stdout_read, repl
13741374
readuntil(stdout_read, "julia> ", keep=true)
13751375
write(stdin_write, "err\n")
13761376
readline(stdout_read)
1377+
@test readline(stdout_read) == "\e[0mERROR: UndefVarError: err not defined"
1378+
readuntil(stdout_read, "julia> ", keep=true)
1379+
write(stdin_write, "foo() = foobar\n")
1380+
write(stdin_write, "foo()\n")
1381+
readline(stdout_read)
13771382
@test readline(stdout_read) == "\e[0m1-element ExceptionStack:"
13781383
@test readline(stdout_read) == "ERROR: UndefVarError: foobar not defined"
13791384
@test readline(stdout_read) == "Stacktrace:"

0 commit comments

Comments
 (0)