Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for upper/lower/titlecase and fix call #55443

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/strings/annotated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ a vector of region–annotation tuples.
In accordance with the semantics documented in [`AnnotatedString`](@ref), the
order of annotations returned matches the order in which they were applied.

See also: `annotate!`.
See also: [`annotate!`](@ref).
"""
annotations(s::AnnotatedString) = s.annotations

Expand Down
2 changes: 1 addition & 1 deletion base/strings/unicode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Unicode
import Base: show, ==, hash, string, Symbol, isless, length, eltype,
convert, isvalid, ismalformed, isoverlong, iterate,
AnnotatedString, AnnotatedChar, annotated_chartransform,
@assume_effects
@assume_effects, annotations

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

Expand Down
3 changes: 3 additions & 0 deletions test/strings/annotated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ end
@testset "AnnotatedChar" begin
chr = Base.AnnotatedChar('c')
@test chr == Base.AnnotatedChar(chr.char, Pair{Symbol, Any}[])
@test uppercase(chr) == Base.AnnotatedChar('C')
@test titlecase(chr) == Base.AnnotatedChar('C')
@test lowercase(Base.AnnotatedChar('C')) == chr
str = Base.AnnotatedString("hmm", [(1:1, :attr => "h0h0"),
(1:2, :attr => "h0m1"),
(2:3, :attr => "m1m2")])
Expand Down