add unit test for input broken across ringbuffer boundary #1916
Labels
enhancement
New feature or request
hax0rs-wanted
looking to hack on notcurses? try these
input
readin' dem bytes
i'd like some assurance that we properly recognize UTF8 broken across the end of the ringbuffer. that ought be easy enough -- just find a sequence that doesn't evenly divide
BUFSIZ
. SinceBUFSIZ
is almost always a power of 2, and we know that no power of 2 is divided by 3, a 3-byte UTF8 character ought suffice. Pump (BUFSIZ + 3)/3 of them into input, and then loop through withnotcurses_getc()
, and ensure they all come back.The text was updated successfully, but these errors were encountered: