Browse Source

Fix #8 now unit test temporary files are removed

Yann Weber 7 years ago
parent
commit
cd35c78724
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      tests/ttail_init_logfile.c

+ 3
- 0
tests/ttail_init_logfile.c View File

55
 	ck_assert(ttail->logfile_name != NULL);
55
 	ck_assert(ttail->logfile_name != NULL);
56
 	ck_assert_str_eq(ttail->logfile_name[0], fname);
56
 	ck_assert_str_eq(ttail->logfile_name[0], fname);
57
 	ck_assert(ttail->logfile[0] != NULL);
57
 	ck_assert(ttail->logfile[0] != NULL);
58
+	unlink(fname);
58
 	free(fname);
59
 	free(fname);
59
 }
60
 }
60
 END_TEST
61
 END_TEST
84
 	ck_assert(ttail->logfile_name != NULL);
85
 	ck_assert(ttail->logfile_name != NULL);
85
 	ck_assert_str_eq(ttail->logfile_name[0], fname);
86
 	ck_assert_str_eq(ttail->logfile_name[0], fname);
86
 	ck_assert(ttail->logfile[0] != NULL);
87
 	ck_assert(ttail->logfile[0] != NULL);
88
+	unlink(fname);
87
 	free(fname);
89
 	free(fname);
88
 }
90
 }
89
 END_TEST
91
 END_TEST
135
 	}
137
 	}
136
 	for(i=0; i<20; i++)
138
 	for(i=0; i<20; i++)
137
 	{
139
 	{
140
+		unlink(fname[i]);
138
 		free(fname[i]);
141
 		free(fname[i]);
139
 	}
142
 	}
140
 }
143
 }

Loading…
Cancel
Save