diff options
Diffstat (limited to 'csv-test.c')
| -rw-r--r-- | csv-test.c | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -17,6 +17,21 @@ | |||
| 17 | f = NULL | 17 | f = NULL |
| 18 | 18 | ||
| 19 | void | 19 | void |
| 20 | test_empty_object(void) | ||
| 21 | { | ||
| 22 | { | ||
| 23 | csv_t csv = { 0 }; | ||
| 24 | assert( csv_nfields(&csv) == 0 ); | ||
| 25 | } | ||
| 26 | |||
| 27 | { | ||
| 28 | csv_t csv; | ||
| 29 | csv_init(&csv); | ||
| 30 | assert( csv_nfields(&csv) == 0 ); | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | void | ||
| 20 | test_line_endings1(void) | 35 | test_line_endings1(void) |
| 21 | { | 36 | { |
| 22 | FILE *f; | 37 | FILE *f; |
| @@ -566,6 +581,7 @@ test_allocation_error1(void) | |||
| 566 | int | 581 | int |
| 567 | main(void) | 582 | main(void) |
| 568 | { | 583 | { |
| 584 | test_empty_object(); | ||
| 569 | test_line_endings1(); | 585 | test_line_endings1(); |
| 570 | test_line_endings2(); | 586 | test_line_endings2(); |
| 571 | test_empty_fields(); | 587 | test_empty_fields(); |
