Compare commits

..

4 Commits

2 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,7 @@ inline ssize_t get_line_file(char** lineptr, size_t* n, FILE* stream) {
}
#else
using ssize_t = int64_t;
using ssize_t = intptr_t;
ssize_t get_line_file(char** lineptr, size_t* n, FILE* fp) {
if (lineptr == nullptr || n == nullptr || fp == nullptr) {

View File

@ -581,10 +581,13 @@ void test_no_new_line_at_eof() {
test_no_new_line_at_eof_impl<buffer_mode>(
{{1, 2, std::string(i, 'X')}});
for (size_t j = 0; j < 2 * ss::get_line_initial_buffer_size; ++j) {
for (size_t j = 0; j < 2 * ss::get_line_initial_buffer_size; j += 13) {
test_no_new_line_at_eof_impl<buffer_mode>(
{{1, 2, std::string(i, 'X')}, {3, 4, std::string(j, 'Y')}});
test_no_new_line_at_eof_impl<buffer_mode>(
{{1, 2, std::string(j, 'X')}, {3, 4, std::string(i, 'Y')}});
}
}
}