Module: wine Branch: master Commit: 842d1b698dfb649954e197d58c42606580462c59 URL: http://source.winehq.org/git/wine.git/?a=commit;h=842d1b698dfb649954e197d58c...
Author: Rob Shearman rob@codeweavers.com Date: Fri Oct 19 23:22:58 2007 +0100
ole32: Add a test to show that operations on overwritten should no longer succeed.
---
dlls/ole32/tests/storage32.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 2349add..8e6502c 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -329,8 +329,20 @@ static void test_storage_stream(void) /* wrap up */ r = IStream_Release(stm2); ok(r == 0, "wrong ref count\n"); + + /* create a stream and write to it */ + r = IStorage_CreateStream(stg, stmname, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm2 ); + ok(r==S_OK, "IStorage->CreateStream failed\n"); + + r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p); + todo_wine + ok(r==STG_E_REVERTED, "overwritten stream should return STG_E_REVERTED instead of 0x%08x\n", r); + + r = IStream_Release(stm2); + ok(r == 0, "wrong ref count\n"); r = IStream_Release(stm); ok(r == 0, "wrong ref count\n"); + r = IStorage_Release(stg); ok(r == 0, "wrong ref count\n"); r = DeleteFileW(filename);