Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a61e1177
Commit
a61e1177
authored
Mar 30, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix some test failures on Win9x and WinME.
parent
317edfd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
profile.c
dlls/kernel32/tests/profile.c
+19
-4
No files found.
dlls/kernel32/tests/profile.c
View file @
a61e1177
...
...
@@ -802,6 +802,8 @@ static void test_GetPrivateProfileString(const char *content, const char *descri
DeleteFileA
(
filename
);
}
static
DWORD
timeout
=
0
;
static
BOOL
check_file_data
(
LPCSTR
path
,
LPCSTR
data
)
{
HANDLE
file
;
...
...
@@ -809,6 +811,10 @@ static BOOL check_file_data(LPCSTR path, LPCSTR data)
DWORD
size
;
BOOL
ret
;
/* Sleep() is needed on Win9x and WinME */
if
(
timeout
)
Sleep
(
timeout
);
file
=
CreateFileA
(
path
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
...
...
@@ -847,6 +853,8 @@ static void test_WritePrivateProfileString(void)
broken
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
||
/* NT4 */
broken
(
GetLastError
()
==
0xdeadbeef
),
/* Win9x and WinME */
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
GetLastError
());
if
(
GetLastError
()
==
0xdeadbeef
)
timeout
=
1000
;
ok
(
GetFileAttributesA
(
path
)
==
INVALID_FILE_ATTRIBUTES
,
"Expected path to not exist
\n
"
);
...
...
@@ -905,7 +913,9 @@ static void test_WritePrivateProfileString(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
todo_wine
{
ok
(
check_file_data
(
path
,
data
),
"File doesn't match
\n
"
);
ok
(
check_file_data
(
path
,
data
)
||
(
broken
(
GetFileAttributesA
(
path
)
==
INVALID_FILE_ATTRIBUTES
)),
/* Win9x and WinME */
"File doesn't match
\n
"
);
}
DeleteFileA
(
path
);
...
...
@@ -913,15 +923,20 @@ static void test_WritePrivateProfileString(void)
data
=
"[App]
\r\n
"
"key=
\r\n
"
;
ret
=
WritePrivateProfileStringA
(
"App"
,
"key"
,
""
,
path
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
check_file_data
(
path
,
data
),
"File doesn't match
\n
"
);
ok
(
ret
==
TRUE
||
broken
(
!
ret
),
/* Win9x and WinME */
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
check_file_data
(
path
,
data
)
||
(
broken
(
GetFileAttributesA
(
path
)
==
INVALID_FILE_ATTRIBUTES
)),
/* Win9x and WinME */
"File doesn't match
\n
"
);
DeleteFileA
(
path
);
/* empty lpFileName */
SetLastError
(
0xdeadbeef
);
ret
=
WritePrivateProfileStringA
(
"App"
,
"key"
,
"string"
,
""
);
ok
(
ret
==
FALSE
,
"Expected FALSE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
||
broken
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
),
/* Win9x and WinME */
"Expected ERROR_ACCESS_DENIED, got %d
\n
"
,
GetLastError
());
/* The resulting file will be X:\\%WINDIR%\\win1.tmp */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment