Add coverage for terminal_input_parser.

This commit is contained in:
ArthurSonzogni
2022-04-27 11:11:32 +02:00
parent 06ed8567b8
commit 5ba301d316
3 changed files with 184 additions and 20 deletions

View File

@@ -136,12 +136,11 @@ TerminalInputParser::Output TerminalInputParser::ParseUTF8() {
unsigned int first_zero = 8; // NOLINT
for (unsigned int i = 0; i < 8; ++i) { // NOLINT
mask |= selector;
if (head & selector) {
selector >>= 1U;
continue;
if (!(head & selector)) {
first_zero = i;
break;
}
first_zero = i;
break;
selector >>= 1U;
}
// Accumulate the value of the first byte.