Skip to content

Commit

Permalink
Test for showing AnnotatedIOBuffer (#56246)
Browse files Browse the repository at this point in the history
Doesn't seem to be covered at the moment
  • Loading branch information
inkydragon authored Dec 11, 2024
2 parents 29a7ce4 + 1f87ccf commit 10f294b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/strings/annotated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,8 @@ end
@test write(wrapio, Base.AnnotatedChar('a', [(:y, 2)])) == 1
@test read(seekstart(aio), Base.AnnotatedString) ==
Base.AnnotatedString("heya", [(1:3, :x, 1), (4:4, :y, 2)])
# show-ing an AnnotatedIOBuffer
aio = Base.AnnotatedIOBuffer()
write(aio, Base.AnnotatedString("hello", [(1:5, :tag, 1)]))
@test sprint(show, aio) == "Base.AnnotatedIOBuffer(5 bytes, 1 annotation)"
end

0 comments on commit 10f294b

Please sign in to comment.