Skip to content

Commit 5fab51a

Browse files
authored
Tests for substrings of annotated strings (#56584)
Codecov shows these as not covered yet
1 parent e29d211 commit 5fab51a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/strings/annotated.jl

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
@test str[3:4] == SubString(str, 3, 4)
3535
@test str[3:4] != SubString("me")
3636
@test SubString("me") != str[3:4]
37+
@test Base.AnnotatedString(str[3:4]) == SubString(str, 3, 4)
38+
@test repeat(SubString(str, 3, 4), 2) == repeat(Base.AnnotatedString(str[3:4]), 2)
39+
@test reverse(SubString(str, 3, 4)) == reverse(Base.AnnotatedString(str[3:4]))
3740
@test Base.AnnotatedString(str[3:4]) ==
3841
Base.AnnotatedString("me", [(1:2, :thing, 0x01), (1:2, :all, 0x03)])
3942
@test Base.AnnotatedString(str[3:6]) ==

0 commit comments

Comments
 (0)