summaryrefslogtreecommitdiff
path: root/csv-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'csv-test.c')
-rw-r--r--csv-test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/csv-test.c b/csv-test.c
index c5152ea..552bbb8 100644
--- a/csv-test.c
+++ b/csv-test.c
@@ -39,7 +39,7 @@ test_line_endings1(void)
39 assert( strcmp(csv_field(&csv, 1), "E") == 0 ); 39 assert( strcmp(csv_field(&csv, 1), "E") == 0 );
40 assert( strcmp(csv_field(&csv, 2), "F") == 0 ); 40 assert( strcmp(csv_field(&csv, 2), "F") == 0 );
41 41
42 assert( csv_read(&csv, f) == -1 ); 42 assert( csv_read(&csv, f) == EOF );
43 43
44 FMEMCLOSE(f); 44 FMEMCLOSE(f);
45} 45}
@@ -67,7 +67,7 @@ test_line_endings2(void)
67 assert( strcmp(csv_field(&csv, 1), "E") == 0 ); 67 assert( strcmp(csv_field(&csv, 1), "E") == 0 );
68 assert( strcmp(csv_field(&csv, 2), "F") == 0 ); 68 assert( strcmp(csv_field(&csv, 2), "F") == 0 );
69 69
70 assert( csv_read(&csv, f) == -1 ); 70 assert( csv_read(&csv, f) == EOF );
71 71
72 FMEMCLOSE(f); 72 FMEMCLOSE(f);
73} 73}
@@ -216,7 +216,7 @@ test_empty_fields(void)
216 assert( strcmp(csv_field(&csv, 2), "") == 0 ); 216 assert( strcmp(csv_field(&csv, 2), "") == 0 );
217 217
218 // EOF 218 // EOF
219 assert( csv_read(&csv, f) == -1 ); 219 assert( csv_read(&csv, f) == EOF );
220 220
221 FMEMCLOSE(f); 221 FMEMCLOSE(f);
222} 222}
@@ -365,7 +365,7 @@ test_simple_fields(void)
365 assert( strcmp(csv_field(&csv, 2), "C") == 0 ); 365 assert( strcmp(csv_field(&csv, 2), "C") == 0 );
366 366
367 // EOF 367 // EOF
368 assert( csv_read(&csv, f) == -1 ); 368 assert( csv_read(&csv, f) == EOF );
369 369
370 FMEMCLOSE(f); 370 FMEMCLOSE(f);
371} 371}
@@ -388,7 +388,7 @@ test_quoted_fields(void)
388 assert( strcmp(csv_field(&csv, 3), "foo \"baz\" bar") == 0 ); 388 assert( strcmp(csv_field(&csv, 3), "foo \"baz\" bar") == 0 );
389 assert( strcmp(csv_field(&csv, 4), "foo \"baz\", bar") == 0 ); 389 assert( strcmp(csv_field(&csv, 4), "foo \"baz\", bar") == 0 );
390 390
391 assert( csv_read(&csv, f) == -1 ); 391 assert( csv_read(&csv, f) == EOF );
392 392
393 FMEMCLOSE(f); 393 FMEMCLOSE(f);
394} 394}
@@ -407,7 +407,7 @@ test_wrong_quoted_field(void)
407 assert( csv_nfields(&csv) == 1 ), 407 assert( csv_nfields(&csv) == 1 ),
408 assert( strcmp(csv_field(&csv, 0), "foo") == 0 ); 408 assert( strcmp(csv_field(&csv, 0), "foo") == 0 );
409 409
410 assert( csv_read(&csv, f) == -1 ); 410 assert( csv_read(&csv, f) == EOF );
411 411
412 FMEMCLOSE(f); 412 FMEMCLOSE(f);
413} 413}
@@ -471,7 +471,7 @@ test_read_error(void)
471 471
472 switch ( setjmp(env) ) { 472 switch ( setjmp(env) ) {
473 case CSV_ERR_OK: 473 case CSV_ERR_OK:
474 assert( csv_read(&csv, f) == -1 ); 474 assert( csv_read(&csv, f) == EOF );
475 break; 475 break;
476 476
477 case CSV_ERR_IO_READ: 477 case CSV_ERR_IO_READ: