Remove temporary files in tests/
This commit is contained in:
parent
e69ecdac9e
commit
a7110f5021
54
tests/02.c~
54
tests/02.c~
@ -1,54 +0,0 @@
|
||||
#include "../include/easycsv/easycsv.h"
|
||||
|
||||
#define CSV_FP "02.csv"
|
||||
#define CSV_MODE "w"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct easycsv *csv = easycsv_init(CSV_FP, CSV_MODE);
|
||||
|
||||
if (csv == NULL) {
|
||||
fprintf(stderr, "Failed to load %s\n", CSV_FP);
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char mod_one[] = "first-mod-deluxe-edition";
|
||||
|
||||
const char *paths_one[5] = {
|
||||
"FILEPATH1ONE",
|
||||
"FILEPATH2ONE",
|
||||
"FILEPATH3ONE",
|
||||
"FILEPATH4ONE",
|
||||
"FILEPATH5ONE"
|
||||
};
|
||||
|
||||
const char mod_two[] = "second-mod-gold-edition";
|
||||
|
||||
const char *paths_two[4] = {
|
||||
"FILEPATH1TWO",
|
||||
"FILEPATH2TWO",
|
||||
"FILEPATH3TWO",
|
||||
"FILEPATH4TWO"
|
||||
};
|
||||
|
||||
if (easycsv_pushcolumn(csv, mod_one) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (size_t st = 0; st < 5; st++) {
|
||||
if (easycsv_pushcolumnvalue(csv, mod_one, paths_one[st]) < 0) return -1;
|
||||
}
|
||||
|
||||
if (easycsv_pushcolumn(csv, mod_two) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (size_t st = 0; st < 4; st++) {
|
||||
if (easycsv_pushcolumnvalue(csv, mod_two, paths_two[st]) < 0) return -1;
|
||||
}
|
||||
|
||||
easycsv_free(csv);
|
||||
csv = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user