1
1
mirror of https://github.com/walles/moar.git synced 2024-09-21 09:01:30 +03:00

Add more plaintext-vs-cells verification

This commit is contained in:
Johan Walles 2021-04-25 10:08:19 +02:00
parent 5e2a63dc36
commit 7814f6af2f

View File

@ -46,6 +46,19 @@ func TestTokenize(t *testing.T) {
continue
}
// Tokens and plain have the same lengths, compare contents
for index, plainChar := range plainString {
cellChar := tokens[index]
if cellChar.Rune != plainChar {
t.Errorf("%s:%d, 0-based column %d: cell char <%c> != plain char <%c> in <%s>",
fileName, lineNumber, index,
cellChar.Rune, plainChar,
line,
)
break
}
}
if len(loglines.String()) != 0 {
t.Errorf("%s: %s", fileName, loglines.String())
continue