#include #include #include #include TEST(AP_CSVReader, basic) { static const char *basic_csv = "A 1\n" "B 2\n" "C 3\n" "Fred 31\n" ; static const char *basic_csv_crlf = "A 1\r\n" "B 2\r\n" "C 3\r\n" "Fred 31\r\n" ; static const char *basic_csv_results[][2] = { {"A", "1"}, {"B", "2"}, {"C", "3"}, {"Fred", "31"} }; uint8_t term[16]; AP_CSVReader csvreader{term, ARRAY_SIZE(term), ' '}; const char *csvs[] { basic_csv, basic_csv_crlf }; for (const char *csv : csvs) { uint8_t termcount = 0; uint8_t linecount = 0; for (uint8_t i=0; i