File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 49
49
" \e [19;1H\e [J\e [1;20r\e [18;1H"
50
50
end
51
51
52
- @noinline func_barrier (f) = f ()
53
-
54
52
@testset " Sticky messages with ANSI codes" begin
55
53
buf = IOBuffer ()
56
54
dsize = (20 , 80 ) # Intentionally different from default of 25 rows
57
- func_barrier () do
58
- # Hide stickies variable behind a function barrier to make sure(er)
59
- # that it can be GC'd.
60
- stickies = StickyMessages (IOContext (buf, :displaysize => dsize), ansi_codes= true )
61
- push! (stickies, :a => " a-msg\n " )
62
- push! (stickies, :b => " b-msg\n " )
63
- take! (buf)
64
- nothing
65
- end
66
- # Hack to force StickyMessages finalizer
67
- GC. gc (true ) # trigger finalizer
55
+ stickies = StickyMessages (IOContext (buf, :displaysize => dsize), ansi_codes= true )
56
+ push! (stickies, :a => " a-msg\n " )
57
+ push! (stickies, :b => " b-msg\n " )
58
+ take! (buf)
59
+ finalize (stickies)
60
+ # Hack to allow StickyMessages async cleanup to run
68
61
for i= 1 : 1000
69
- yield () # allow async cleanup
62
+ yield ()
70
63
end
71
64
@test String (take! (buf)) == # clear #csr #pos
72
65
" \e [19;1H\e [J\e [1;20r\e [18;1H"
Original file line number Diff line number Diff line change 304
304
@test format_message (" # Hi" , 6 , io_ctx) ==
305
305
[" " ,
306
306
" Hi" ,
307
- " ≡≡ ≡≡" ]
307
+ VERSION < v " 1.10-DEV " ? " ≡≡≡≡ " : " ≡≡" ]
308
308
309
309
# For non-strings a blank line is added so that any formatting for
310
310
# vertical alignment isn't broken
You can’t perform that action at this time.
0 commit comments