test graphemes
parent
1e39213a45
commit
16fafd4414
|
@ -68,7 +68,7 @@ function Base.chr2ind(s::GraphemeIterator, i::Integer)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Base.endof(g::GraphemeIterator) = endof(g.s)
|
Base.endof(g::GraphemeIterator) = endof(g.s)
|
||||||
Base.SubString(x::GraphemeIterator, i, j) = SubString(x.s, i, j)
|
Base.SubString(x::GraphemeIterator, i, j) = graphemes(SubString(x.s, i, j))
|
||||||
|
|
||||||
|
|
||||||
typealias GraphemeOrString Union{GraphemeIterator, AbstractString}
|
typealias GraphemeOrString Union{GraphemeIterator, AbstractString}
|
||||||
|
|
|
@ -150,3 +150,6 @@ for x in solutions
|
||||||
@test_approx_eq_eps evaluate(t, strings[i]...) solution[i] 1e-4
|
@test_approx_eq_eps evaluate(t, strings[i]...) solution[i] 1e-4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@test evaluate(Hamming(), "b\u0300", "a") == 2
|
||||||
|
@test evaluate(Hamming(), graphemes("b\u0300"), graphemes("a")) == 1
|
Loading…
Reference in New Issue