mirror of
https://github.com/walles/moar.git
synced 2024-09-21 09:01:30 +03:00
Fix off-by-X problems comparing strings
Due to byte offsets vs rune offsets. This fixes some invalid test failures.
This commit is contained in:
parent
5e59515d3f
commit
b17c44af28
@ -57,7 +57,8 @@ func TestTokenize(t *testing.T) {
|
||||
}
|
||||
|
||||
// Tokens and plain have the same lengths, compare contents
|
||||
for index, plainChar := range plainString {
|
||||
plainStringChars := []rune(plainString)
|
||||
for index, plainChar := range plainStringChars {
|
||||
cellChar := tokens[index]
|
||||
if cellChar.Rune == plainChar {
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user