Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f1087d86
Commit
f1087d86
authored
Mar 04, 2014
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Skip some profile tests if not allowed to create files in the Windows directory.
parent
daaae48e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
profile.c
dlls/kernel32/tests/profile.c
+13
-9
No files found.
dlls/kernel32/tests/profile.c
View file @
f1087d86
...
...
@@ -1019,18 +1019,22 @@ static void test_WritePrivateProfileString(void)
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
*/
/*
Relative paths are relative to X:\\%WINDIR%
*/
GetWindowsDirectoryA
(
temp
,
MAX_PATH
);
GetTempFileNameA
(
temp
,
"win"
,
1
,
path
);
DeleteFileA
(
path
);
if
(
GetFileAttributesA
(
path
)
==
INVALID_FILE_ATTRIBUTES
)
skip
(
"Not allowed to create a file in the Windows directory
\n
"
);
else
{
DeleteFileA
(
path
);
/* relative path in lpFileName */
data
=
"[App]
\r\n
"
"key=string
\r\n
"
;
ret
=
WritePrivateProfileStringA
(
"App"
,
"key"
,
"string"
,
"win1.tmp"
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
check_file_data
(
path
,
data
),
"File doesn't match
\n
"
);
DeleteFileA
(
path
);
data
=
"[App]
\r\n
"
"key=string
\r\n
"
;
ret
=
WritePrivateProfileStringA
(
"App"
,
"key"
,
"string"
,
"win1.tmp"
)
;
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d, le=%u
\n
"
,
ret
,
GetLastError
()
);
ok
(
check_file_data
(
path
,
data
),
"File doesn't match
\n
"
);
DeleteFileA
(
path
);
}
GetTempPathA
(
MAX_PATH
,
temp
);
GetTempFileNameA
(
temp
,
"wine"
,
0
,
path
);
...
...
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