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
4f86b5cd
Commit
4f86b5cd
authored
Jul 05, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Don't crash on win98.
parent
203bcf42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
profile.c
dlls/kernel32/tests/profile.c
+15
-6
No files found.
dlls/kernel32/tests/profile.c
View file @
4f86b5cd
...
...
@@ -137,6 +137,7 @@ static void test_profile_sections(void)
char
*
p
;
static
const
char
content
[]
=
"[section1]
\r\n
name1=val1
\r\n
name2=
\r\n
name3
\r\n
name4=val4
\r\n
[section2]
\r\n
"
;
static
const
char
testfile4
[]
=
".
\\
testwine4.ini"
;
BOOL
on_win98
=
FALSE
;
DeleteFileA
(
testfile4
);
h
=
CreateFileA
(
testfile4
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
@@ -149,17 +150,25 @@ static void test_profile_sections(void)
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
NULL
,
NULL
,
0
,
NULL
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
0xdeadbeef
/* Win98 */
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
if
(
GetLastError
()
==
0xdeadbeef
)
on_win98
=
TRUE
;
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
NULL
,
NULL
,
0
,
testfile4
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
0xdeadbeef
/* Win98 */
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
"section1"
,
NULL
,
0
,
testfile4
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
if
(
!
on_win98
)
{
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
"section1"
,
NULL
,
0
,
testfile4
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
}
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
NULL
,
buf
,
sizeof
(
buf
),
testfile4
);
...
...
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