Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Aug 6, 2024
1 parent c67ebbe commit dcad1b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/strings/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ SubStr(s) = SubString("abc$(s)de", firstindex(s) + 3, lastindex(s) + 3)
@test textwidth(c^3) == w*3
@test w == @invoke textwidth(c::AbstractChar)
end
for i in 0x00:0x7f # test all ASCII chars (which have fast path)
w = Int(ccall(:utf8proc_charwidth, Cint, (UInt32,), i))
c = Char(i)
@test textwidth(c) == w
@test w == @invoke textwidth(c::AbstractChar)
end
end

@testset "padding (lpad and rpad)" begin
Expand Down

0 comments on commit dcad1b0

Please sign in to comment.