Skip to content

Commit 981f3d2

Browse files
authored
[REPL] tests: be better about correct IO ordering (#47160)
Particularly relevant for COLUMNS being narrow for some cases, or the kernel being configured with small IO buffers, or both. Or someone setting a particularly long path for TMPDIR. Or so on.
1 parent f424431 commit 981f3d2

File tree

2 files changed

+121
-95
lines changed

2 files changed

+121
-95
lines changed

stdlib/REPL/test/lineedit.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ end
474474
# julia> is 6 characters + 1 character for space,
475475
# so the rest of the terminal is 73 characters
476476
#########################################################################
477-
let buf = IOBuffer(
477+
withenv("COLUMNS"=>"80") do
478+
buf = IOBuffer(
478479
"begin\nprint(\"A very very very very very very very very very very very very ve\")\nend")
479480
seek(buf, 4)
480481
outbuf = IOBuffer()

0 commit comments

Comments
 (0)