Paul Vriens : shlwapi/tests: Don't create testfile at a fixed location.
Alexandre Julliard
julliard at winehq.org
Fri Jun 6 08:55:33 CDT 2008
Module: wine
Branch: master
Commit: 6689994362e841b0a9c15f245d7d5deb3558a947
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6689994362e841b0a9c15f245d7d5deb3558a947
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Fri Jun 6 13:20:26 2008 +0200
shlwapi/tests: Don't create testfile at a fixed location.
---
dlls/shlwapi/tests/istream.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c
index ef7191c..d8aced5 100644
--- a/dlls/shlwapi/tests/istream.c
+++ b/dlls/shlwapi/tests/istream.c
@@ -197,10 +197,15 @@ static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm)
IStream * stream;
HRESULT ret;
ULONG refcount;
- static const char * test_file = "c:\\test.txt";
+ char test_file[MAX_PATH];
+ static const CHAR testA_txt[] = "\\testA.txt";
trace("SHCreateStreamOnFileA: testing mode %d, STGM flags %08x\n", mode, stgm);
+ /* Don't used a fixed path for the testA.txt file */
+ GetTempPathA(MAX_PATH, test_file);
+ lstrcatA(test_file, testA_txt);
+
/* invalid arguments */
stream = NULL;
@@ -284,10 +289,15 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm)
IStream * stream;
HRESULT ret;
ULONG refcount;
- static const WCHAR test_file[] = { 'c', ':', '\\', 't', 'e', 's', 't', '.', 't', 'x', 't', '\0' };
+ WCHAR test_file[MAX_PATH];
+ static const WCHAR testW_txt[] = { '\\', 't', 'e', 's', 't', 'W', '.', 't', 'x', 't', '\0' };
trace("SHCreateStreamOnFileW: testing mode %d, STGM flags %08x\n", mode, stgm);
+ /* Don't used a fixed path for the testW.txt file */
+ GetTempPathW(MAX_PATH, test_file);
+ lstrcatW(test_file, testW_txt);
+
/* invalid arguments */
stream = NULL;
More information about the wine-cvs
mailing list