summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--csv-test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/csv-test.c b/csv-test.c
index 552bbb8..8fbcf42 100644
--- a/csv-test.c
+++ b/csv-test.c
@@ -17,6 +17,21 @@
17 f = NULL 17 f = NULL
18 18
19void 19void
20test_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
34void
20test_line_endings1(void) 35test_line_endings1(void)
21{ 36{
22 FILE *f; 37 FILE *f;
@@ -566,6 +581,7 @@ test_allocation_error1(void)
566int 581int
567main(void) 582main(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();