WIP, Continue writing additional parser tests

This commit is contained in:
ado 2023-07-29 19:23:24 +02:00
parent 560bf815dc
commit f28f000035

View File

@ -1344,14 +1344,21 @@ std::vector<std::string> generate_csv_data(const std::vector<field>& data,
void write_to_file(const std::vector<std::string>& data,
const std::string& delim, const std::string& file_name) {
std::ofstream out{file_name, std::ios_base::app};
std::string line;
for (size_t i = 0; i < data.size(); ++i) {
out << data[i];
line += data[i];
if (i != data.size() - 1) {
out << delim;
line += delim;
}
}
out << std::endl;
out.close();
#ifdef _WIN32
line += "\n";
#else
line += "\r\n";
#endif
out << line;
}
template <typename... Ts>