Restructure unit test program to include unit tests and alternate error handling.

Don't log all strings after adding one.

Don't trim string buffer after reading a token.
This commit is contained in:
Michael R Sweet
2021-05-10 08:00:27 -04:00
parent af8c731699
commit 67ed214c59
3 changed files with 279 additions and 123 deletions

View File

@ -453,6 +453,7 @@ _pdfioTokenRead(_pdfio_token_t *tb, // I - Token buffer/stack
while (tb->bufptr < tb->bufend && isspace(*(tb->bufptr)))
tb->bufptr ++;
#if 0
if (tb->bufptr > tb->buffer)
{
size_t remaining = (size_t)(tb->bufend - tb->bufptr);
@ -474,6 +475,7 @@ _pdfioTokenRead(_pdfio_token_t *tb, // I - Token buffer/stack
tb->bufptr = tb->bufend = tb->buffer;
}
}
#endif // 0
*bufptr = '\0';