summaryrefslogtreecommitdiff
path: root/test/testmmap.c
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2002-12-15 19:03:09 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2002-12-15 19:03:09 +0000
commit3a0c20fddaa99f7973b7d1dbb02fe5e84d34cc31 (patch)
tree6c357ddac615a025ac10856182a6503a581f7e3e /test/testmmap.c
parentffc328d2ccf1f9275aa74c255d335cb8634281da (diff)
downloadlibapr-3a0c20fddaa99f7973b7d1dbb02fe5e84d34cc31.tar.gz
testmmap now cleans up all of its file descriptors correctly.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64177 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testmmap.c')
-rw-r--r--test/testmmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/testmmap.c b/test/testmmap.c
index dd1ae1f9d..495ea7c5a 100644
--- a/test/testmmap.c
+++ b/test/testmmap.c
@@ -95,6 +95,14 @@ static void create_filename(CuTest *tc)
CuAssertTrue(tc, oldfileptr != file1);
}
+static void test_file_close(CuTest *tc)
+{
+ apr_status_t rv;
+
+ rv = apr_file_close(thefile);
+ CuAssertIntEquals(tc, rv, APR_SUCCESS);
+}
+
static void test_file_open(CuTest *tc)
{
apr_status_t rv;
@@ -165,6 +173,7 @@ CuSuite *testmmap(void)
SUITE_ADD_TEST(suite, test_mmap_contents);
SUITE_ADD_TEST(suite, test_mmap_offset);
SUITE_ADD_TEST(suite, test_mmap_delete);
+ SUITE_ADD_TEST(suite, test_file_close);
#else
SUITE_ADD_TEST(suite, not_implemented);
#endif