Add extended tests with no new line at eof

This commit is contained in:
ado
2024-02-22 00:30:05 +01:00
parent 57ba23c574
commit 3ea8adedfd
4 changed files with 43 additions and 41 deletions

View File

@@ -5,6 +5,7 @@
#include "exception.hpp"
#include "extract.hpp"
#include "restrictions.hpp"
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <optional>
@@ -742,7 +743,6 @@ private:
reader(const reader& other) = delete;
reader& operator=(const reader& other) = delete;
// TODO set error numbers on error
ssize_t get_line_buffer(char** lineptr, size_t* n,
const char* const buffer, size_t csv_data_size,
size_t& curr_char) {
@@ -812,6 +812,9 @@ private:
}
if (ssize == -1) {
if (errno == ENOMEM) {
throw std::bad_alloc{};
}
return false;
}