Skip to content

Commit 39eaa3c

Browse files
authored
Add test for upper/lower/titlecase and fix missing import (#55443)
1 parent fc7b40e commit 39eaa3c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

base/strings/annotated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ a vector of region–annotation tuples.
384384
In accordance with the semantics documented in [`AnnotatedString`](@ref), the
385385
order of annotations returned matches the order in which they were applied.
386386
387-
See also: `annotate!`.
387+
See also: [`annotate!`](@ref).
388388
"""
389389
annotations(s::AnnotatedString) = s.annotations
390390

base/strings/unicode.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Unicode
66
import Base: show, ==, hash, string, Symbol, isless, length, eltype,
77
convert, isvalid, ismalformed, isoverlong, iterate,
88
AnnotatedString, AnnotatedChar, annotated_chartransform,
9-
@assume_effects
9+
@assume_effects, annotations
1010

1111
# whether codepoints are valid Unicode scalar values, i.e. 0-0xd7ff, 0xe000-0x10ffff
1212

test/strings/annotated.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ end
6464
@testset "AnnotatedChar" begin
6565
chr = Base.AnnotatedChar('c')
6666
@test chr == Base.AnnotatedChar(chr.char, Pair{Symbol, Any}[])
67+
@test uppercase(chr) == Base.AnnotatedChar('C')
68+
@test titlecase(chr) == Base.AnnotatedChar('C')
69+
@test lowercase(Base.AnnotatedChar('C')) == chr
6770
str = Base.AnnotatedString("hmm", [(1:1, :attr => "h0h0"),
6871
(1:2, :attr => "h0m1"),
6972
(2:3, :attr => "m1m2")])

0 commit comments

Comments
 (0)