Quellcode durchsuchen

Fix #8 now unit test temporary files are removed

Yann Weber vor 7 Jahren
Ursprung
Commit
cd35c78724
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3
    0
      tests/ttail_init_logfile.c

+ 3
- 0
tests/ttail_init_logfile.c Datei anzeigen

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

Laden…
Abbrechen
Speichern