summaryrefslogtreecommitdiff
path: root/test/testfile.c
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2005-10-19 16:05:19 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2005-10-19 16:05:19 +0000
commit0919f59cd50e17482713eee6daa720a1a0e5312b (patch)
tree760f858fda08cda5aaff3cb093c64bd3c9ce761f /test/testfile.c
parentee075b85fced61a6d57ce8c551e102775e957a4f (diff)
downloadlibapr-0919f59cd50e17482713eee6daa720a1a0e5312b.tar.gz
* file_io/unix/seek.c (setptr): Don't ignore errors from
apr_file_flush. * test/testfile.c (test_fail_read_flush): Add test. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@326593 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testfile.c')
-rw-r--r--test/testfile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/testfile.c b/test/testfile.c
index d27fb0764..c6e14c965 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -795,6 +795,16 @@ static void test_fail_read_flush(abts_case *tc, void *data)
ABTS_ASSERT(tc, "gets should flush buffered write and fail",
rv != APR_SUCCESS && rv != APR_EOF);
+ /* Likewise for seek. */
+ {
+ apr_off_t offset = 0;
+
+ rv = apr_file_seek(f, APR_SET, &offset);
+ }
+
+ ABTS_ASSERT(tc, "seek should flush buffered write and fail",
+ rv != APR_SUCCESS && rv != APR_EOF);
+
apr_file_close(f);
}