Skip to content

Commit dcad1b0

Browse files
committed
more tests
1 parent c67ebbe commit dcad1b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/strings/util.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ SubStr(s) = SubString("abc$(s)de", firstindex(s) + 3, lastindex(s) + 3)
88
@test textwidth(c^3) == w*3
99
@test w == @invoke textwidth(c::AbstractChar)
1010
end
11+
for i in 0x00:0x7f # test all ASCII chars (which have fast path)
12+
w = Int(ccall(:utf8proc_charwidth, Cint, (UInt32,), i))
13+
c = Char(i)
14+
@test textwidth(c) == w
15+
@test w == @invoke textwidth(c::AbstractChar)
16+
end
1117
end
1218

1319
@testset "padding (lpad and rpad)" begin

0 commit comments

Comments
 (0)