lua-users home
lua-l archive

Re: Is this a wrong test?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Op Wo. 3 Apr. 2019 om 10:45 het 最萌 小汐 <sumneko@hotmail.com> geskryf:
>
> testes\utf8.lua: 69
The line in question is:
assert(utf8.len(s, 1, pi, -1, nonstrict) == i)
The effect is the same as
 assert(utf8.len(s, 1, pi, true) == i)
but perhaps the intended test was
 assert(utf8.len(s, 1, pi, nonstrict) == i)
which is only the same when nonstrict is truey.

AltStyle によって変換されたページ (->オリジナル) /