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
182e7514
Commit
182e7514
authored
Apr 20, 2009
by
Dmitry Kislyuk
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Added GetPrivateProfileSection and GetPrivateProfileString tests for…
kernel32: Added GetPrivateProfileSection and GetPrivateProfileString tests for empty section scenario.
parent
c0f6808d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
profile.c
dlls/kernel32/tests/profile.c
+21
-1
No files found.
dlls/kernel32/tests/profile.c
View file @
182e7514
...
@@ -186,7 +186,15 @@ static void test_profile_sections(void)
...
@@ -186,7 +186,15 @@ static void test_profile_sections(void)
broken
(
GetLastError
()
==
0xdeadbeef
),
/* Win9x, WinME */
broken
(
GetLastError
()
==
0xdeadbeef
),
/* Win9x, WinME */
"expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
GetLastError
());
"expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
GetLastError
());
/* And a real one */
/* Existing empty section with no keys */
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
"section2"
,
buf
,
sizeof
(
buf
),
testfile4
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* Win9x, WinME */
"expected ERROR_SUCCESS, got %d
\n
"
,
GetLastError
());
/* Existing section with keys and values*/
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileSectionA
(
"section1"
,
buf
,
sizeof
(
buf
),
testfile4
);
ret
=
GetPrivateProfileSectionA
(
"section1"
,
buf
,
sizeof
(
buf
),
testfile4
);
for
(
p
=
buf
+
strlen
(
buf
)
+
1
;
*
p
;
p
+=
strlen
(
p
)
+
1
)
for
(
p
=
buf
+
strlen
(
buf
)
+
1
;
*
p
;
p
+=
strlen
(
p
)
+
1
)
...
@@ -798,6 +806,18 @@ static void test_GetPrivateProfileString(const char *content, const char *descri
...
@@ -798,6 +806,18 @@ static void test_GetPrivateProfileString(const char *content, const char *descri
ok
(
ret
==
4
,
"Expected 4, got %d
\n
"
,
ret
);
ok
(
ret
==
4
,
"Expected 4, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buf
,
"val1"
),
"Expected
\"
val1
\"
, got
\"
%s
\"\n
"
,
buf
);
ok
(
!
lstrcmpA
(
buf
,
"val1"
),
"Expected
\"
val1
\"
, got
\"
%s
\"\n
"
,
buf
);
/* Existing section with no keys in an existing file */
memset
(
buf
,
0xc
,
sizeof
(
buf
));
SetLastError
(
0xdeadbeef
);
ret
=
GetPrivateProfileStringA
(
"section2"
,
"DoesntExist"
,
""
,
buf
,
MAX_PATH
,
filename
);
ok
(
ret
==
0
,
"expected return size 0, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buf
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
buf
);
todo_wine
ok
(
GetLastError
()
==
0xdeadbeef
,
"expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
DeleteFileA
(
path
);
DeleteFileA
(
path
);
DeleteFileA
(
filename
);
DeleteFileA
(
filename
);
}
}
...
...
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