Skip to content

Commit

Permalink
[REPL] tests: be better about correct IO ordering (#47160)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vtjnash authored Oct 14, 2022
1 parent f424431 commit 981f3d2
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 95 deletions.
3 changes: 2 additions & 1 deletion stdlib/REPL/test/lineedit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ end
# julia> is 6 characters + 1 character for space,
# so the rest of the terminal is 73 characters
#########################################################################
let buf = IOBuffer(
withenv("COLUMNS"=>"80") do
buf = IOBuffer(
"begin\nprint(\"A very very very very very very very very very very very very ve\")\nend")
seek(buf, 4)
outbuf = IOBuffer()
Expand Down
Loading

0 comments on commit 981f3d2

Please sign in to comment.