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
a4f733ab
Commit
a4f733ab
authored
Apr 16, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Apr 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix a few failing tests in win2k.
parent
25c02c88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
environ.c
dlls/kernel32/tests/environ.c
+22
-8
No files found.
dlls/kernel32/tests/environ.c
View file @
a4f733ab
...
...
@@ -364,6 +364,8 @@ static void test_GetComputerNameExA(void)
LPSTR
name
;
DWORD
error
;
static
const
int
MAX_COMP_NAME
=
32767
;
if
(
!
pGetComputerNameExA
)
{
skip
(
"GetComputerNameExA function not implemented
\n
"
);
...
...
@@ -373,8 +375,11 @@ static void test_GetComputerNameExA(void)
size
=
0
;
ret
=
pGetComputerNameExA
(
ComputerNameDnsDomain
,
(
LPSTR
)
0xdeadbeef
,
&
size
);
error
=
GetLastError
();
ok
(
!
ret
&&
error
==
ERROR_MORE_DATA
,
"GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d
\n
"
,
error
);
trace
(
"domain size is %d
\n
"
,
size
);
ok
(
ret
==
0
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
error
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
error
);
/* size is not set in win2k */
size
=
MAX_COMP_NAME
;
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
name
[
0
]));
ok
(
name
!=
NULL
,
"HeapAlloc failed with error %d
\n
"
,
GetLastError
());
ret
=
pGetComputerNameExA
(
ComputerNameDnsDomain
,
name
,
&
size
);
...
...
@@ -385,8 +390,11 @@ static void test_GetComputerNameExA(void)
size
=
0
;
ret
=
pGetComputerNameExA
(
ComputerNameDnsFullyQualified
,
(
LPSTR
)
0xdeadbeef
,
&
size
);
error
=
GetLastError
();
ok
(
!
ret
&&
error
==
ERROR_MORE_DATA
,
"GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d
\n
"
,
error
);
trace
(
"fully qualified hostname size is %d
\n
"
,
size
);
ok
(
ret
==
0
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
error
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
error
);
/* size is not set in win2k */
size
=
MAX_COMP_NAME
;
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
name
[
0
]));
ok
(
name
!=
NULL
,
"HeapAlloc failed with error %d
\n
"
,
GetLastError
());
ret
=
pGetComputerNameExA
(
ComputerNameDnsFullyQualified
,
name
,
&
size
);
...
...
@@ -397,8 +405,11 @@ static void test_GetComputerNameExA(void)
size
=
0
;
ret
=
pGetComputerNameExA
(
ComputerNameDnsHostname
,
(
LPSTR
)
0xdeadbeef
,
&
size
);
error
=
GetLastError
();
ok
(
!
ret
&&
error
==
ERROR_MORE_DATA
,
"GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d
\n
"
,
error
);
trace
(
"hostname size is %d
\n
"
,
size
);
ok
(
ret
==
0
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
error
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
error
);
/* size is not set in win2k */
size
=
MAX_COMP_NAME
;
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
name
[
0
]));
ok
(
name
!=
NULL
,
"HeapAlloc failed with error %d
\n
"
,
GetLastError
());
ret
=
pGetComputerNameExA
(
ComputerNameDnsHostname
,
name
,
&
size
);
...
...
@@ -409,8 +420,11 @@ static void test_GetComputerNameExA(void)
size
=
0
;
ret
=
pGetComputerNameExA
(
ComputerNameNetBIOS
,
(
LPSTR
)
0xdeadbeef
,
&
size
);
error
=
GetLastError
();
ok
(
!
ret
&&
error
==
ERROR_MORE_DATA
,
"GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d
\n
"
,
error
);
trace
(
"NetBIOS size is %d
\n
"
,
size
);
ok
(
ret
==
0
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
error
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
error
);
/* size is not set in win2k */
size
=
MAX_COMP_NAME
;
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
name
[
0
]));
ok
(
name
!=
NULL
,
"HeapAlloc failed with error %d
\n
"
,
GetLastError
());
ret
=
pGetComputerNameExA
(
ComputerNameNetBIOS
,
name
,
&
size
);
...
...
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