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
a48d470e
Commit
a48d470e
authored
Feb 23, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr80/tests: Test _dupenv_s outcome with missing env var.
parent
63fb1633
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
msvcr80.c
dlls/msvcr80/tests/msvcr80.c
+20
-0
No files found.
dlls/msvcr80/tests/msvcr80.c
View file @
a48d470e
...
...
@@ -62,6 +62,7 @@ static int (__cdecl *p__close)(int);
static
intptr_t
(
__cdecl
*
p__get_osfhandle
)(
int
);
static
int
(
__cdecl
*
p_strcmp
)(
const
char
*
,
const
char
*
);
static
int
(
__cdecl
*
p_strncmp
)(
const
char
*
,
const
char
*
,
size_t
);
static
int
(
__cdecl
*
p_dupenv_s
)(
char
**
,
size_t
*
,
const
char
*
);
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hcrt,y)
#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
...
...
@@ -83,6 +84,7 @@ static BOOL init(void)
SET
(
p_strcmp
,
"strcmp"
);
SET
(
p_strncmp
,
"strncmp"
);
SET
(
p_dupenv_s
,
"_dupenv_s"
);
return
TRUE
;
}
...
...
@@ -184,6 +186,23 @@ static void test_strcmp(void)
ok
(
ret
==
0
,
"wrong ret %d
\n
"
,
ret
);
}
static
void
test_dupenv_s
(
void
)
{
size_t
len
;
char
*
tmp
;
int
ret
;
len
=
0xdeadbeef
;
tmp
=
(
void
*
)
0xdeadbeef
;
ret
=
p_dupenv_s
(
&
tmp
,
&
len
,
"nonexistent"
);
todo_wine
ok
(
!
ret
,
"_dupenv_s returned %d
\n
"
,
ret
);
todo_wine
ok
(
!
len
,
"_dupenv_s returned length is %Id
\n
"
,
len
);
todo_wine
ok
(
!
tmp
,
"_dupenv_s returned pointer is %p
\n
"
,
tmp
);
}
START_TEST
(
msvcr80
)
{
if
(
!
init
())
...
...
@@ -191,4 +210,5 @@ START_TEST(msvcr80)
test_ioinfo_flags
();
test_strcmp
();
test_dupenv_s
();
}
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