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
48f035bd
Commit
48f035bd
authored
Jan 28, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Jan 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix some test failures on Win9x and WinME (GetPrivateProfileSectionNames).
parent
7099cdeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
profile.c
dlls/kernel32/tests/profile.c
+16
-6
No files found.
dlls/kernel32/tests/profile.c
View file @
48f035bd
...
...
@@ -217,9 +217,13 @@ static void test_profile_sections_names(void)
/* Test with sufficiently large buffer */
memset
(
buf
,
0xc
,
sizeof
(
buf
));
ret
=
GetPrivateProfileSectionNamesA
(
buf
,
29
,
testfile3
);
ok
(
ret
==
27
,
"expected return size 27, got %d
\n
"
,
ret
);
ok
(
buf
[
ret
-
1
]
==
0
&&
buf
[
ret
]
==
0
,
"returned buffer not terminated with double-null
\n
"
);
ok
(
ret
==
27
||
broken
(
ret
==
28
),
/* Win9x, WinME */
"expected return size 27, got %d
\n
"
,
ret
);
ok
(
(
buf
[
ret
-
1
]
==
0
&&
buf
[
ret
]
==
0
)
||
broken
(
buf
[
ret
-
1
]
==
0
&&
buf
[
ret
-
2
]
==
0
),
/* Win9x, WinME */
"returned buffer not terminated with double-null
\n
"
);
/* Test with exactly fitting buffer */
memset
(
buf
,
0xc
,
sizeof
(
buf
));
ret
=
GetPrivateProfileSectionNamesA
(
buf
,
28
,
testfile3
);
...
...
@@ -236,13 +240,19 @@ static void test_profile_sections_names(void)
memset
(
buf
,
0xc
,
sizeof
(
buf
));
ret
=
GetPrivateProfileSectionNamesA
(
buf
,
27
,
testfile3
);
ok
(
ret
==
25
,
"expected return size 25, got %d
\n
"
,
ret
);
/* Win9x and WinME only fills the buffer with complete section names (double-null terminated) */
count
=
strlen
(
"section1"
)
+
sizeof
(
CHAR
)
+
strlen
(
"section2"
);
todo_wine
ok
(
buf
[
ret
+
1
]
==
0
&&
buf
[
ret
]
==
0
,
"returned buffer not terminated with double-null
\n
"
);
ok
(
(
buf
[
ret
+
1
]
==
0
&&
buf
[
ret
]
==
0
)
||
broken
(
buf
[
count
]
==
0
&&
buf
[
count
+
1
]
==
0
),
/* Win9x, WinME */
"returned buffer not terminated with double-null
\n
"
);
/* Tests on nonexistent file */
memset
(
buf
,
0xc
,
sizeof
(
buf
));
ret
=
GetPrivateProfileSectionNamesA
(
buf
,
10
,
".
\\
not_here.ini"
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
ret
==
0
||
broken
(
ret
==
1
),
/* Win9x, WinME */
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
buf
[
0
]
==
0
,
"returned buffer not terminated with null
\n
"
);
ok
(
buf
[
1
]
!=
0
,
"returned buffer terminated with double-null
\n
"
);
...
...
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