mirror of
https://github.com/troglobit/libite.git
synced 2026-10-23 11:34:37 +00:00
tests: Add fremove() pass to fopenf() unit test for cleanup
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
16ea69adb4
commit
f85ff3c835
1 file changed
+7
@@ -6,6 +6,7 @@ int main(void)
|
||||
char *dir = "/tmp";
|
||||
char *file = "__foo__";
|
||||
|
||||
printf("Pass 1/2: fopenf() ===========================\n");
|
||||
fp = fopenf("w", "%s/%s", dir, file);
|
||||
if (fp) {
|
||||
fputs("foo", fp);
|
||||
@@ -14,5 +15,11 @@ int main(void)
|
||||
|
||||
fail_unless(fexist("/tmp/__foo__"));
|
||||
|
||||
printf("Pass 2/2: fremove() ==========================\n");
|
||||
fremove("%s/%s", dir, file);
|
||||
fail_unless(!fexist("/tmp/__foo__"));
|
||||
|
||||
printf("DONE =========================================\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user