[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] test-freading: remove a temporary file
From: |
Jim Meyering |
Subject: |
[PATCH] test-freading: remove a temporary file |
Date: |
Sat, 14 Nov 2009 13:22:04 +0100 |
Hi Bruno,
Without this change, this test's temporary file is left behind every
time it is run.
Any objection?
>From 314ab5c4729f34bcb2aca85181091a4f22d98e52 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 14 Nov 2009 13:20:25 +0100
Subject: [PATCH] test-freading: remove a temporary file
* tests/test-freading.c: Include <unistd.h>.
(main): Unlink temporary file.
---
ChangeLog | 4 ++++
tests/test-freading.c | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/tests/test-freading.c b/tests/test-freading.c
index dfa5ffb..4dfe3f3 100644
--- a/tests/test-freading.c
+++ b/tests/test-freading.c
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
@@ -170,9 +171,11 @@ main (void)
if (fclose (fp))
goto skip;
+ unlink (TESTFILE);
return 0;
skip:
fprintf (stderr, "Skipping test: file operations failed.\n");
+ unlink (TESTFILE);
return 77;
}
--
1.6.5.2.372.gc0502
- [PATCH] test-freading: remove a temporary file,
Jim Meyering <=