add csv test

This commit is contained in:
ineed bots 2023-09-10 14:16:37 -06:00
parent 14b96a0082
commit b830aba980

View File

@ -9,6 +9,7 @@
#include <utils/string.hpp> #include <utils/string.hpp>
#include <utils/http.hpp> #include <utils/http.hpp>
#include <json.hpp> #include <json.hpp>
#include <parser.hpp>
namespace test namespace test
{ {
@ -30,6 +31,21 @@ namespace test
//Disable unknown dvar spam //Disable unknown dvar spam
utils::hook::nop(0x5F04AF, 5); utils::hook::nop(0x5F04AF, 5);
if (utils::io::file_exists("some_file.csv"))
{
std::ifstream f("some_file.csv");
aria::csv::CsvParser parser(f);
for (auto& row : parser)
{
for (auto& field : row)
{
printf("%s", std::format("{} | ", field).c_str());
}
printf("\n");
}
}
} }
private: private: